mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Core/WorldSession: Add RBAC permission for skipping idle connection check (#20595)
This commit is contained in:
File diff suppressed because one or more lines are too long
7
sql/updates/auth/3.3.5/2017_10_13_00_auth.sql
Normal file
7
sql/updates/auth/3.3.5/2017_10_13_00_auth.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `rbac_permissions` WHERE `id`=7;
|
||||
INSERT INTO `rbac_permissions` (`id`,`name`) VALUES
|
||||
(7, 'Skip idle connection check');
|
||||
|
||||
DELETE FROM `rbac_linked_permissions` WHERE `linkedId`=7;
|
||||
INSERT INTO `rbac_linked_permissions` (`id`,`linkedId`) VALUES
|
||||
(196,7);
|
||||
@@ -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, // not on 3.3.5a
|
||||
|
||||
@@ -273,7 +273,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->CloseSocket();
|
||||
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
|
||||
Reference in New Issue
Block a user