mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
display reason for ban to banned user
This commit is contained in:
parent
6344b987de
commit
ff3eb9b5f4
19 changed files with 98 additions and 59 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue