mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
show ban duration in client
This commit is contained in:
parent
78d188c462
commit
13b992cf12
15 changed files with 159 additions and 91 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue