force users to log out their unregistered session after logging in with a new registered account

This commit is contained in:
Max-Wilhelm Bruker
2011-03-02 17:18:44 +01:00
parent 1bee788210
commit 3bb1d9a1de
6 changed files with 10 additions and 3 deletions

View File

@@ -237,6 +237,8 @@ ResponseCode Server_ProtocolHandler::cmdLogin(Command_Login *cmd, CommandContain
authState = server->loginUser(this, userName, cmd->getPassword());
if (authState == PasswordWrong)
return RespWrongPassword;
if (authState == WouldOverwriteOldSession)
return RespWouldOverwriteOldSession;
enqueueProtocolItem(new Event_ServerMessage(server->getLoginMessage()));