|
@ -116,13 +116,20 @@ int RenX::Server::think() |
|
|
int RenX::Server::OnRehash() |
|
|
int RenX::Server::OnRehash() |
|
|
{ |
|
|
{ |
|
|
Jupiter::StringS oldHostname = RenX::Server::hostname; |
|
|
Jupiter::StringS oldHostname = RenX::Server::hostname; |
|
|
unsigned short oldPort = RenX::Server::port; |
|
|
|
|
|
Jupiter::StringS oldClientHostname = RenX::Server::clientHostname; |
|
|
Jupiter::StringS oldClientHostname = RenX::Server::clientHostname; |
|
|
Jupiter::StringS oldPass = RenX::Server::pass; |
|
|
Jupiter::StringS oldPass = RenX::Server::pass; |
|
|
|
|
|
unsigned short oldPort = RenX::Server::port; |
|
|
int oldSteamFormat = RenX::Server::steamFormat; |
|
|
int oldSteamFormat = RenX::Server::steamFormat; |
|
|
RenX::Server::commands.emptyAndDelete(); |
|
|
RenX::Server::commands.emptyAndDelete(); |
|
|
RenX::Server::init(); |
|
|
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); |
|
|
RenX::Server::reconnect(RenX::DisconnectReason::Rehash); |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|