mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Write port override
This commit is contained in:
parent
8fc38c617f
commit
27bff89e66
@ -278,10 +278,16 @@ void CServerHandler::justConnectToServer(const std::string & addr, const ui16 po
|
||||
|
||||
c->handler = std::make_shared<boost::thread>(&CServerHandler::threadHandleConnection, this);
|
||||
|
||||
if(addr.empty() || addr == localhostAddress)
|
||||
return;
|
||||
Settings serverAddress = settings.write["server"]["server"];
|
||||
serverAddress->String() = addr;
|
||||
if(!addr.empty() && addr != localhostAddress)
|
||||
{
|
||||
Settings serverAddress = settings.write["server"]["server"];
|
||||
serverAddress->String() = addr;
|
||||
}
|
||||
if(port && port != getDefaultPort())
|
||||
{
|
||||
Settings serverPort = settings.write["server"]["port"];
|
||||
serverPort->Integer() = port;
|
||||
}
|
||||
}
|
||||
|
||||
void CServerHandler::applyPacksOnLobbyScreen()
|
||||
|
Loading…
Reference in New Issue
Block a user