diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-17 10:06:29 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-17 10:47:50 -0600 |
commit | 076d39f6b83ca495d380d338f396bfb1fd589324 (patch) | |
tree | 8e9543e14576d8fe58276ecce485b8bd54ac7b14 | |
parent | 40182c386251741c210d33e400e7d2ba8ab37287 (diff) | |
download | mana-client-076d39f6b83ca495d380d338f396bfb1fd589324.tar.gz mana-client-076d39f6b83ca495d380d338f396bfb1fd589324.tar.bz2 mana-client-076d39f6b83ca495d380d338f396bfb1fd589324.tar.xz mana-client-076d39f6b83ca495d380d338f396bfb1fd589324.zip |
Allow branding to bypass server list
Reviewed-by: Bernd Wachter
-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 } |