diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-05 15:25:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-05 15:25:23 +0300 |
commit | 8b3c79f23d910db0f2c031a828783c1c2273eaf7 (patch) | |
tree | 3cad056ba8aa09774675987d16bf3882c0592df8 /src | |
parent | e3b9d60938b1299f2f66e68ff291060654c58d66 (diff) | |
download | mv-8b3c79f23d910db0f2c031a828783c1c2273eaf7.tar.gz mv-8b3c79f23d910db0f2c031a828783c1c2273eaf7.tar.bz2 mv-8b3c79f23d910db0f2c031a828783c1c2273eaf7.tar.xz mv-8b3c79f23d910db0f2c031a828783c1c2273eaf7.zip |
Fix remember checkbox in login dialog.
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index b91150626..9861696d4 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -933,9 +933,16 @@ int Client::gameExec() mServerName = mCurrentServer.hostname; initServerConfig(mCurrentServer.hostname); if (mOptions.username.empty()) - loginData.username = serverConfig.getValue("username", ""); + { + if (loginData.remember) + loginData.username = serverConfig.getValue("username", ""); + else + loginData.username = ""; + } else + { loginData.username = mOptions.username; + } loginData.remember = serverConfig.getValue("remember", 1); @@ -1957,6 +1964,8 @@ void Client::accountLogin(LoginData *data) // than the login gui window if (data->remember) serverConfig.setValue("username", data->username); + else + serverConfig.setValue("username", ""); serverConfig.setValue("remember", data->remember); } |