Simplify advertise_server assignation

Since it's a bool we can just assign the result of the comparation
This commit is contained in:
likeawindrammer 2020-08-28 07:09:57 -06:00
parent 8dee403e7c
commit de150ef9b3

View File

@ -219,10 +219,9 @@ bool ConfigManager::loadServerSettings(server_settings* settings)
} }
else { else {
config->beginGroup("Options"); config->beginGroup("Options");
if (config->value("advertise", "true").toString() != "true") // Will be true of false depending on the key
settings->advertise_server = false; settings->advertise_server =
else (config->value("advertise", "true").toString() == "true");
settings->advertise_server = true;
if (config->value("webao_enable", "true").toString() != "true") if (config->value("webao_enable", "true").toString() != "true")
settings->ws_port = -1; settings->ws_port = -1;