diff options
| author | leak <leak@bitmx.net> | 2012-02-25 22:05:47 +0100 |
|---|---|---|
| committer | leak <leak@bitmx.net> | 2012-02-25 22:06:18 +0100 |
| commit | 1ebdc5c19cc871ab2e00e75c3e477972151c8e7f (patch) | |
| tree | 4bb077abaaad99d527811934becd4b85a22980f2 /src/server/scripts | |
| parent | f0d0d95cf9350bfc77113a58e8541f6866658e9d (diff) | |
Core/Warden: Add reload ability for character.warden_action table / Centralize the crypto keys in one header file
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 17c819f2f22..361d329ac6b 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -37,6 +37,7 @@ EndScriptData */ #include "SkillExtraItems.h" #include "Chat.h" #include "WaypointManager.h" +#include "WardenCheckMgr.h" class reload_commandscript : public CommandScript { @@ -151,6 +152,7 @@ public: { "spell_threats", SEC_ADMINISTRATOR, true, &HandleReloadSpellThreatsCommand, "", NULL }, { "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "", NULL }, { "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "", NULL }, + { "warden_action", SEC_ADMINISTRATOR, true, &HandleReloadWardenActionCommand, "", NULL }, { "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "", NULL }, { "waypoint_data", SEC_ADMINISTRATOR, true, &HandleReloadWpCommand, "", NULL }, { "vehicle_accessory", SEC_ADMINISTRATOR, true, &HandleReloadVehicleAccessoryCommand, "", NULL }, @@ -724,6 +726,21 @@ public: return true; } + static bool HandleReloadWardenActionCommand(ChatHandler* handler, const char* /*args*/) + { + if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED)) + { + handler->SendSysMessage("Warden system disabled by config - reloading warden_action skipped."); + handler->SetSentErrorMessage(true); + return false; + } + + sLog->outString("Re-Loading warden_action Table!"); + sWardenCheckMgr->LoadWardenOverrides(); + handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded."); + return true; + } + static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/) { sLog->outString("Re-Loading `npc_trainer` Table!"); |
