From 420480c2f8e14bb305a3f831dfc6513a2a47a29f Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 26 Dec 2021 11:47:25 -0600 Subject: [PATCH] Move exempt util to anticheat js --- scripts/server/anticheat.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/server/anticheat.js b/scripts/server/anticheat.js index 6c04c2f6..bebfe6bf 100644 --- a/scripts/server/anticheat.js +++ b/scripts/server/anticheat.js @@ -236,4 +236,16 @@ function toggleAntiCheatScriptBlackListCommand(command, params, client) { messageAdminAction(`${getPlayerName(client)} {MAINCOLOUR}turned anticheat game script blacklist ${getBoolRedGreenInlineColour(getServerConfig().antiCheat.gameScriptBlackListEnabled)}${toUpperCase(getOnOffFromBool(getServerConfig().antiCheat.gameScriptBlackListEnabled))}`); updateServerRules(); return true; -} \ No newline at end of file +} + +// =========================================================================== + +function isPlayerExemptFromAntiCheat(client) { + if(hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("ExemptFromAntiCheat"))) { + return true; + } + + return false; +} + +// =========================================================================== \ No newline at end of file