diff options
author | Spp <spp@jorge.gr> | 2013-02-27 03:29:11 +0100 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2013-02-27 03:30:53 +0100 |
commit | 480c6cf4dd8965627aa7bc6e903558f2fa5c3ea6 (patch) | |
tree | 23b29b1b9fb0d778aa1b63cd18e551c17f731086 /src/server/scripts | |
parent | 4ea31ce8862cbc1bc4b9c35bc2ff677cbb6c4a16 (diff) |
Core/RBAC: Add .reload rbac command and prevent possible crash if rbac_permissions has wrong data
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 3f15c3fe6b7..7aee1139868 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -22,6 +22,7 @@ Comment: All reload related commands Category: commandscripts EndScriptData */ +#include "AccountMgr.h" #include "AchievementMgr.h" #include "AuctionHouseMgr.h" #include "Chat.h" @@ -128,6 +129,7 @@ public: { "prospecting_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesProspectingCommand, "", NULL }, { "quest_poi", SEC_ADMINISTRATOR, true, &HandleReloadQuestPOICommand, "", NULL }, { "quest_template", SEC_ADMINISTRATOR, true, &HandleReloadQuestTemplateCommand, "", NULL }, + { "rbac", SEC_ADMINISTRATOR, true, &HandleReloadRBACCommand, "", NULL }, { "reference_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesReferenceCommand, "", NULL }, { "reserved_name", SEC_ADMINISTRATOR, true, &HandleReloadReservedNameCommand, "", NULL }, { "reputation_reward_rate", SEC_ADMINISTRATOR, true, &HandleReloadReputationRewardRateCommand, "", NULL }, @@ -1242,6 +1244,15 @@ public: handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded."); return true; } + + static bool HandleReloadRBACCommand(ChatHandler* handler, const char* /*args*/) + { + sLog->outInfo(LOG_FILTER_GENERAL, "Reloading RBAC tables..."); + sAccountMgr->LoadRBAC(); + sWorld->ReloadRBAC(); + handler->SendGlobalGMSysMessage("RBAC data reloaded."); + return true; + } }; void AddSC_reload_commandscript() |