1
0
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:
nordsoft 2022-10-30 19:59:43 +04:00
parent 8fc38c617f
commit 27bff89e66

View File

@ -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()