mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix servatrice's regonly mode
This commit is contained in:
parent
faa66e4d7f
commit
15555c16fd
5 changed files with 12 additions and 5 deletions
|
|
@ -34,7 +34,6 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QThread>
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
|
||||
Server::Server(bool _threaded, QObject *parent)
|
||||
: QObject(parent), threaded(_threaded), nextLocalGameId(0)
|
||||
|
|
@ -132,8 +131,7 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
|||
} else if (authState == UnknownUser) {
|
||||
// Change user name so that no two users have the same names,
|
||||
// don't interfere with registered user names though.
|
||||
QSettings settings("servatrice.ini", QSettings::IniFormat);
|
||||
bool requireReg = settings.value("authentication/regonly", 0).toBool();
|
||||
bool requireReg = databaseInterface->getRequireRegistration();
|
||||
if (requireReg) {
|
||||
qDebug("Login denied: registration required");
|
||||
databaseInterface->unlockSessionTables();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue