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 /src/client.cpp | |
parent | 40182c386251741c210d33e400e7d2ba8ab37287 (diff) | |
download | mana-076d39f6b83ca495d380d338f396bfb1fd589324.tar.gz mana-076d39f6b83ca495d380d338f396bfb1fd589324.tar.bz2 mana-076d39f6b83ca495d380d338f396bfb1fd589324.tar.xz mana-076d39f6b83ca495d380d338f396bfb1fd589324.zip |
Allow branding to bypass server list
Reviewed-by: Bernd Wachter
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 7 |
1 files changed, 5 insertions, 2 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 |