mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
converted some Player commands to command lists; added db type checks in server
This commit is contained in:
parent
0c9a2b061c
commit
4634787b00
4 changed files with 127 additions and 75 deletions
|
|
@ -56,7 +56,7 @@ public:
|
|||
Servatrice(QSettings *_settings, QObject *parent = 0);
|
||||
~Servatrice();
|
||||
bool openDatabase();
|
||||
void checkSql();
|
||||
bool checkSql();
|
||||
bool execSqlQuery(QSqlQuery &query);
|
||||
QString getServerName() const { return serverName; }
|
||||
QString getLoginMessage() const { return loginMessage; }
|
||||
|
|
@ -87,6 +87,10 @@ protected:
|
|||
bool userExists(const QString &user);
|
||||
AuthenticationResult checkUserPassword(Server_ProtocolHandler *handler, const QString &user, const QString &password, QString &reasonStr);
|
||||
private:
|
||||
enum AuthenticationMethod { AuthenticationNone, AuthenticationSql };
|
||||
enum DatabaseType { DatabaseNone, DatabaseMySql };
|
||||
AuthenticationMethod authenticationMethod;
|
||||
DatabaseType databaseType;
|
||||
QTimer *pingClock, *statusUpdateClock;
|
||||
QTcpServer *tcpServer;
|
||||
QString serverName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue