mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
Declare Correction
Added missing declarations.
This commit is contained in:
parent
b4c40b7714
commit
87ebc66117
3 changed files with 4 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ message Response {
|
|||
RespUserIsBanned = 19;
|
||||
RespAccessDenied = 20;
|
||||
RespUsernameInvalid = 21;
|
||||
RespRegRequired = 22;
|
||||
RespRegistrationRequired = 22;
|
||||
}
|
||||
enum ResponseType {
|
||||
JOIN_ROOM = 1000;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,8 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
|||
QSettings *settings = new QSettings("servatrice.ini", QSettings::IniFormat);
|
||||
bool requireReg = settings->value("server/regonly").toBool();
|
||||
if (requireReg)
|
||||
qDebug("Login denied: registration required");
|
||||
databaseInterface->unlockSessionTables();
|
||||
return RegistrationRequired;
|
||||
|
||||
QString tempName = name;
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ 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 RegistrationRequired: return Response::RespRegRequired;
|
||||
case RegistrationRequired: return Response::RespRegistrationRequired;
|
||||
default: authState = res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue