Core/WorldSession: Add RBAC permission for skipping idle connection check (#20595)

(cherry picked from commit 558382ed6d)
This commit is contained in:
Mikhail Redko
2017-10-13 23:26:53 +03:00
committed by Shauren
parent e75c75023a
commit 7625bd960e
4 changed files with 12 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ enum RBACPermissions
RBAC_PERM_JOIN_RANDOM_BG = 4,
RBAC_PERM_JOIN_ARENAS = 5,
RBAC_PERM_JOIN_DUNGEON_FINDER = 6,
// 7 - reuse
RBAC_PERM_IGNORE_IDLE_CONNECTION = 7,
// 8 - reuse
// 9 - reuse
RBAC_PERM_USE_CHARACTER_TEMPLATES = 10,

View File

@@ -329,7 +329,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
///- Before we process anything:
/// If necessary, kick the player because the client didn't send anything for too long
/// (or they've been idling in character select)
if (IsConnectionIdle())
if (IsConnectionIdle() && !HasPermission(rbac::RBAC_PERM_IGNORE_IDLE_CONNECTION))
m_Socket[CONNECTION_TYPE_REALM]->CloseSocket();
///- Retrieve packets from the receive queue and call the appropriate handlers