refactor(Core/Server): Improvements to antidos opcode handling (#21502)

This commit is contained in:
Takenbacon
2025-02-20 22:17:34 -08:00
committed by GitHub
parent f6c4164765
commit 4cd1ed2181
9 changed files with 413 additions and 419 deletions

View File

@@ -47,6 +47,7 @@ EndScriptData */
#include "Tokenize.h"
#include "WardenCheckMgr.h"
#include "WaypointMgr.h"
#include "WorldGlobals.h"
using namespace Acore::ChatCommands;
@@ -73,6 +74,7 @@ public:
};
static ChatCommandTable reloadCommandTable =
{
{ "antidos_opcode_policies", HandleReloadAntiDosOpcodePoliciesCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "auctions", HandleReloadAuctionsCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "dungeon_access_template", HandleReloadDungeonAccessCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "dungeon_access_requirements", HandleReloadDungeonAccessCommand, SEC_ADMINISTRATOR, Console::Yes },
@@ -1199,6 +1201,14 @@ public:
return true;
}
static bool HandleReloadAntiDosOpcodePoliciesCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Reloading AntiDos opcode policies...");
sWorldGlobals->LoadAntiDosOpcodePolicies();
handler->SendGlobalGMSysMessage("AntiDos opcode policies reloaded.");
return true;
}
static bool HandleReloadAuctionsCommand(ChatHandler* handler)
{
///- Reload dynamic data tables from the database