summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
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);
}