mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 03:53:56 -07:00
server shutdown function
This commit is contained in:
parent
5e3db65846
commit
a4c3d48389
33 changed files with 1410 additions and 604 deletions
|
|
@ -50,6 +50,7 @@ class Servatrice : public Server
|
|||
private slots:
|
||||
void statusUpdate();
|
||||
void updateBanTimer();
|
||||
void shutdownTimeout();
|
||||
public:
|
||||
QMutex dbMutex;
|
||||
static const QString versionString;
|
||||
|
|
@ -76,6 +77,7 @@ public:
|
|||
bool getUserBanned(Server_ProtocolHandler *client, const QString &userName) const;
|
||||
void addAddressBan(const QHostAddress &address, int minutes) { addressBanList.append(QPair<QHostAddress, int>(address, minutes)); }
|
||||
void addNameBan(const QString &name, int minutes) { nameBanList.append(QPair<QString, int>(name, minutes)); }
|
||||
void scheduleShutdown(const QString &reason, int minutes);
|
||||
protected:
|
||||
bool userExists(const QString &user);
|
||||
AuthenticationResult checkUserPassword(const QString &user, const QString &password);
|
||||
|
|
@ -92,6 +94,10 @@ private:
|
|||
int maxGameInactivityTime, maxPlayerInactivityTime;
|
||||
int maxUsersPerAddress, messageCountingInterval, maxMessageCountPerInterval, maxMessageSizePerInterval, maxGamesPerUser;
|
||||
ServerInfo_User *evalUserQueryResult(const QSqlQuery &query, bool complete);
|
||||
|
||||
QString shutdownReason;
|
||||
int shutdownMinutes;
|
||||
QTimer *shutdownTimer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue