mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
Merge pull request #1205 from ZeldaZach/fix_1173
Server Name Rules Information
This commit is contained in:
commit
31890450dc
7 changed files with 75 additions and 17 deletions
|
|
@ -25,7 +25,7 @@ public:
|
|||
virtual DeckList *getDeckFromDatabase(int /* deckId */, int /* userId */) { return 0; }
|
||||
|
||||
virtual qint64 startSession(const QString & /* userName */, const QString & /* address */) { return 0; }
|
||||
virtual bool usernameIsValid(const QString & /*userName */) { return true; };
|
||||
virtual bool usernameIsValid(const QString & /*userName */, QString & /* error */) { return true; };
|
||||
public slots:
|
||||
virtual void endSession(qint64 /* sessionId */ ) { }
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -388,7 +388,12 @@ Response::ResponseCode Server_ProtocolHandler::cmdLogin(const Command_Login &cmd
|
|||
}
|
||||
case NotLoggedIn: return Response::RespWrongPassword;
|
||||
case WouldOverwriteOldSession: return Response::RespWouldOverwriteOldSession;
|
||||
case UsernameInvalid: return Response::RespUsernameInvalid;
|
||||
case UsernameInvalid: {
|
||||
Response_Login *re = new Response_Login;
|
||||
re->set_denied_reason_str(reasonStr.toStdString());
|
||||
rc.setResponseExtension(re);
|
||||
return Response::RespUsernameInvalid;
|
||||
}
|
||||
case RegistrationRequired: return Response::RespRegistrationRequired;
|
||||
case UserIsInactive: return Response::RespAccountNotActivated;
|
||||
default: authState = res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue