show ban duration in client

This commit is contained in:
Max-Wilhelm Bruker
2012-03-31 12:07:25 +02:00
parent 78d188c462
commit 13b992cf12
15 changed files with 159 additions and 91 deletions

View File

@@ -66,14 +66,14 @@ void Server::prepareDestroy()
roomsLock.unlock();
}
AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString &name, const QString &password, QString &reasonStr)
AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString &name, const QString &password, QString &reasonStr, int &secondsLeft)
{
if (name.size() > 35)
name = name.left(35);
QWriteLocker locker(&clientsLock);
AuthenticationResult authState = checkUserPassword(session, name, password, reasonStr);
AuthenticationResult authState = checkUserPassword(session, name, password, reasonStr, secondsLeft);
if ((authState == NotLoggedIn) || (authState == UserIsBanned))
return authState;