make ms port selection actually work??

This commit is contained in:
scatterflower 2021-03-11 13:32:20 -06:00
parent 8c39d6ee35
commit b515407967
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ class ConfigManager {
QString ms_ip;
int port;
int ws_port;
int local_port;
int ms_port;
QString name;
QString description;
bool advertise_server;

View File

@ -139,8 +139,8 @@ bool ConfigManager::loadServerSettings(server_settings* settings)
config.value("port", "27016").toInt(&port_conversion_success);
settings->ws_port =
config.value("webao_port", "27017").toInt(&ws_port_conversion_success);
settings->local_port =
config.value("port", "27016").toInt(&local_port_conversion_success);
settings->ms_port =
config.value("ms_port", "27016").toInt(&local_port_conversion_success);
settings->name = config.value("server_name", "My First Server").toString();
settings->description =
config.value("server_description", "This is my flashy new server")

View File

@ -55,8 +55,8 @@ int main(int argc, char* argv[])
else {
if (settings.advertise_server) {
advertiser =
new Advertiser(settings.ms_ip, settings.port,
settings.ws_port, settings.local_port,
new Advertiser(settings.ms_ip, settings.ms_port,
settings.ws_port, settings.port,
settings.name, settings.description);
advertiser->contactMasterServer();
}