Fix #1351 - Server ignores only-reg if in "none" auth mode.

When in none auth mode, registered users don't exist; hence the setting
makes the game impossible to join.

Normally the setting would be greyed out when the user is unregistered,
but commit 475c54bf introduced a new edge case where the stored setting
would apply to the field even if the user is unregistered, making the
setting possible to apply in no-reg mode. Regardless, any client could
have done this, not just the default cockatrice.

The server side fix should prevent all issues in the future.
This commit is contained in:
Daenyth 2015-08-09 16:18:58 -04:00 committed by Gavin Bisesi
parent ea9e966330
commit 6170c9037f
4 changed files with 12 additions and 2 deletions

View file

@ -136,6 +136,7 @@ public:
bool initServer();
QString getServerName() const { return serverName; }
QString getLoginMessage() const { QMutexLocker locker(&loginMessageMutex); return loginMessage; }
bool permitUnregisteredUsers() const { return authenticationMethod != AuthenticationNone; }
bool getGameShouldPing() const { return true; }
bool getClientIdRequired() const { return clientIdRequired; }
bool getRegOnlyServer() const { return regServerOnly; }