mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
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:
@@ -781,6 +781,11 @@ void AnticheatMgr::AnticheatDeleteCommand(ObjectGuid guid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AnticheatMgr::AnticheatPurgeCommand(ChatHandler* handler)
|
||||||
|
{
|
||||||
|
CharacterDatabase.Execute("TRUNCATE TABLE daily_players_reports;");
|
||||||
|
}
|
||||||
|
|
||||||
void AnticheatMgr::ResetDailyReportStates()
|
void AnticheatMgr::ResetDailyReportStates()
|
||||||
{
|
{
|
||||||
for (AnticheatPlayersDataMap::iterator it = m_Players.begin(); it != m_Players.end(); ++it)
|
for (AnticheatPlayersDataMap::iterator it = m_Players.begin(); it != m_Players.end(); ++it)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class AnticheatMgr
|
|||||||
|
|
||||||
void AnticheatGlobalCommand(ChatHandler* handler);
|
void AnticheatGlobalCommand(ChatHandler* handler);
|
||||||
void AnticheatDeleteCommand(ObjectGuid guid);
|
void AnticheatDeleteCommand(ObjectGuid guid);
|
||||||
|
void AnticheatPurgeCommand(ChatHandler* handler);
|
||||||
void ResetDailyReportStates();
|
void ResetDailyReportStates();
|
||||||
private:
|
private:
|
||||||
void SpeedHackDetection(Player* player, MovementInfo movementInfo);
|
void SpeedHackDetection(Player* player, MovementInfo movementInfo);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public:
|
|||||||
{ "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "" },
|
{ "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "" },
|
||||||
{ "jail", SEC_GAMEMASTER, false, &HandleAnticheatJailCommand, "" },
|
{ "jail", SEC_GAMEMASTER, false, &HandleAnticheatJailCommand, "" },
|
||||||
{ "parole", SEC_GAMEMASTER, false, &HandleAnticheatParoleCommand, "" },
|
{ "parole", SEC_GAMEMASTER, false, &HandleAnticheatParoleCommand, "" },
|
||||||
|
{ "purge", SEC_ADMINISTRATOR, true, &HandleAntiCheatPurgeCommand, "" },
|
||||||
{ "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "" }
|
{ "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -276,6 +277,13 @@ public:
|
|||||||
|
|
||||||
return true;
|
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()
|
void AddSC_anticheat_commandscript()
|
||||||
|
|||||||
Reference in New Issue
Block a user