display reason for ban to banned user

This commit is contained in:
Max-Wilhelm Bruker
2012-01-01 19:38:52 +01:00
parent 6344b987de
commit ff3eb9b5f4
19 changed files with 98 additions and 59 deletions

View File

@@ -49,13 +49,13 @@ void Server::prepareDestroy()
delete roomIterator.next().value();
}
AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString &name, const QString &password)
AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString &name, const QString &password, QString &reasonStr)
{
QMutexLocker locker(&serverMutex);
if (name.size() > 35)
name = name.left(35);
AuthenticationResult authState = checkUserPassword(session, name, password);
if (authState == PasswordWrong)
AuthenticationResult authState = checkUserPassword(session, name, password, reasonStr);
if ((authState == NotLoggedIn) || (authState == UserIsBanned))
return authState;
ServerInfo_User data = getUserData(name);