Add: Purge cmd

.anticheat purge clears the whole daily_player_reports table. only administrator level can do run the command.
This commit is contained in:
MDIC
2022-04-09 13:41:46 -04:00
parent 3d98caf636
commit bac7aefd12
3 changed files with 14 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ public:
{ "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "" },
{ "jail", SEC_GAMEMASTER, false, &HandleAnticheatJailCommand, "" },
{ "parole", SEC_GAMEMASTER, false, &HandleAnticheatParoleCommand, "" },
{ "purge", SEC_ADMINISTRATOR, true, &HandleAntiCheatPurgeCommand, "" },
{ "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "" }
};
@@ -276,6 +277,13 @@ public:
return true;
}
static bool HandleAntiCheatPurgeCommand(ChatHandler* handler, const char* /* args */)
{
sAnticheatMgr->AnticheatPurgeCommand(handler);
handler->PSendSysMessage("The Anticheat daily_player_reports has been purged.");
return true;
}
};
void AddSC_anticheat_commandscript()