mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
Mods/Admins/PrivLevels not subject to server idle timeout policy
This commit is contained in:
parent
69b0947c41
commit
330b5c33a6
1 changed files with 2 additions and 1 deletions
|
|
@ -408,7 +408,8 @@ void Server_ProtocolHandler::pingClockTimeout()
|
||||||
|
|
||||||
// PrivLevel users, Moderators, and Admins are not subject to the server idle timeout policy
|
// PrivLevel users, Moderators, and Admins are not subject to the server idle timeout policy
|
||||||
const bool hasPrivLevel = userInfo && QString::fromStdString(userInfo->privlevel()).toLower() != "none";
|
const bool hasPrivLevel = userInfo && QString::fromStdString(userInfo->privlevel()).toLower() != "none";
|
||||||
const bool isModOrAdmin = (userInfo->user_level() & (ServerInfo_User::IsModerator | ServerInfo_User::IsAdmin));
|
const bool isModOrAdmin =
|
||||||
|
userInfo && (userInfo->user_level() & (ServerInfo_User::IsModerator | ServerInfo_User::IsAdmin));
|
||||||
if (!hasPrivLevel && !isModOrAdmin) {
|
if (!hasPrivLevel && !isModOrAdmin) {
|
||||||
if ((server->getIdleClientTimeout() > 0) && (idleClientWarningSent)) {
|
if ((server->getIdleClientTimeout() > 0) && (idleClientWarningSent)) {
|
||||||
if (timeRunning - lastActionReceived > server->getIdleClientTimeout()) {
|
if (timeRunning - lastActionReceived > server->getIdleClientTimeout()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue