mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 11:47:11 -07:00
show ban duration in client
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user