mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Mods/Admins/PrivLevels not subject to server idle timeout policy
This commit is contained in:
parent
c2292c11a6
commit
3d2b1a8435
1 changed files with 3 additions and 1 deletions
|
|
@ -406,7 +406,9 @@ void Server_ProtocolHandler::pingClockTimeout()
|
|||
if (timeRunning - lastDataReceived > server->getMaxPlayerInactivityTime())
|
||||
prepareDestroy();
|
||||
|
||||
if (!userInfo || QString::fromStdString(userInfo->privlevel()).toLower() == "none") {
|
||||
// PrivLevel users, Moderators, and Admins are not subject to the server idle timeout policy
|
||||
if (!userInfo || QString::fromStdString(userInfo->privlevel()).toLower() == "none" ||
|
||||
(userInfo->user_level() & (ServerInfo_User::IsModerator | ServerInfo_User::IsAdmin))) {
|
||||
if ((server->getIdleClientTimeout() > 0) && (idleClientWarningSent)) {
|
||||
if (timeRunning - lastActionReceived > server->getIdleClientTimeout()) {
|
||||
prepareDestroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue