diff options
-rw-r--r-- | src/client.cpp | 7 | ||||
-rw-r--r-- | src/configuration.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index ad9a560b..3944215a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -390,13 +390,15 @@ Client::Client(const Options &options): mCurrentServer.hostname = branding.getValue("defaultServer", "server.themanaworld.org").c_str(); } - if (options.serverPort == 0) + + if (mCurrentServer.port == 0) { mCurrentServer.port = (short) branding.getValue("defaultPort", DEFAULT_PORT); mCurrentServer.type = ServerInfo::parseType( branding.getValue("defaultServerType", "eathena")); } + if (loginData.username.empty() && loginData.remember) loginData.username = config.getValue("username", ""); @@ -599,7 +601,8 @@ int Client::exec() // Allow changing this using a server choice dialog // We show the dialog box only if the command-line // options weren't set. - if (mOptions.serverName.empty() && mOptions.serverPort == 0) + if (mOptions.serverName.empty() && mOptions.serverPort == 0 + && !branding.getValue("onlineServerList", "a").empty()) { // Don't allow an alpha opacity // lower than the default value diff --git a/src/configuration.cpp b/src/configuration.cpp index 60731bdb..1310d642 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -131,7 +131,7 @@ void ConfigurationObject::initFromXML(xmlNodePtr parent_node) std::string name = XML::getProperty(node, "name", std::string()); std::string value = XML::getProperty(node, "value", std::string()); - if (!name.empty() && !value.empty()) + if (!name.empty()) mOptions[name] = value; } // otherwise ignore } |