Browse Source

Severs aren't disconnected on rehash if they didn't have a configured port or hostname (listen servers).

pull/3/head
JustinAJ 10 years ago
parent
commit
d0c2235646
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 11
      RenX.Core/RenX_Server.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

11
RenX.Core/RenX_Server.cpp

@ -116,13 +116,20 @@ int RenX::Server::think()
int RenX::Server::OnRehash()
{
Jupiter::StringS oldHostname = RenX::Server::hostname;
unsigned short oldPort = RenX::Server::port;
Jupiter::StringS oldClientHostname = RenX::Server::clientHostname;
Jupiter::StringS oldPass = RenX::Server::pass;
unsigned short oldPort = RenX::Server::port;
int oldSteamFormat = RenX::Server::steamFormat;
RenX::Server::commands.emptyAndDelete();
RenX::Server::init();
if (oldHostname.equalsi(RenX::Server::hostname) == false || oldPort != RenX::Server::port || oldClientHostname.equalsi(RenX::Server::clientHostname) == false || oldPass.equalsi(RenX::Server::pass) == false)
if (RenX::Server::port == 0 || RenX::Server::hostname.isNotEmpty())
{
RenX::Server::hostname = oldHostname;
RenX::Server::clientHostname = oldClientHostname;
RenX::Server::pass = oldPass;
RenX::Server::port = oldPort;
}
else if (oldHostname.equalsi(RenX::Server::hostname) == false || oldPort != RenX::Server::port || oldClientHostname.equalsi(RenX::Server::clientHostname) == false || oldPass.equalsi(RenX::Server::pass) == false)
RenX::Server::reconnect(RenX::DisconnectReason::Rehash);
return 0;
}

Loading…
Cancel
Save