From d36281b46deb8ce318b1fb192c42a7e171f835ed Mon Sep 17 00:00:00 2001 From: MDIC Date: Sat, 30 Apr 2022 12:26:59 -0400 Subject: [PATCH] fix (cmd): Jail cmd can now be used from console --- src/cs_anticheat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cs_anticheat.cpp b/src/cs_anticheat.cpp index 26ae289..f66b4fe 100644 --- a/src/cs_anticheat.cpp +++ b/src/cs_anticheat.cpp @@ -47,7 +47,7 @@ public: { "global", SEC_GAMEMASTER, true, &HandleAntiCheatGlobalCommand, "" }, { "player", SEC_GAMEMASTER, true, &HandleAntiCheatPlayerCommand, "" }, { "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "" }, - { "jail", SEC_GAMEMASTER, false, &HandleAnticheatJailCommand, "" }, + { "jail", SEC_GAMEMASTER, true, &HandleAnticheatJailCommand, "" }, { "parole", SEC_ADMINISTRATOR, true, &HandleAnticheatParoleCommand, "" }, { "purge", SEC_ADMINISTRATOR, true, &HandleAntiCheatPurgeCommand, "" }, { "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "" } @@ -96,7 +96,10 @@ public: Player* pTarget = player->GetConnectedPlayer(); // teleport both to jail. - handler->GetSession()->GetPlayer()->TeleportTo(1, 16226.5f, 16403.6f, -64.5f, 3.2f); + if (!handler->IsConsole()) + { + handler->GetSession()->GetPlayer()->TeleportTo(1, 16226.5f, 16403.6f, -64.5f, 3.2f); + } WorldLocation loc = WorldLocation(1, 16226.5f, 16403.6f, -64.5f, 3.2f);// GM Jail Location pTarget->TeleportTo(loc);