mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 22:49:39 -04:00
[3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)
(cherry picked from commit 1eca51b417)
This commit is contained in:
@@ -51,6 +51,10 @@ EndScriptData */
|
||||
#include "WaypointManager.h"
|
||||
#include "World.h"
|
||||
|
||||
#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
class reload_commandscript : public CommandScript
|
||||
{
|
||||
public:
|
||||
@@ -408,9 +412,13 @@ public:
|
||||
|
||||
static bool HandleReloadCommandCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
ChatHandler::invalidateCommandTable();
|
||||
handler->SendGlobalGMSysMessage("DB table `command` will be reloaded at next chat command use.");
|
||||
return true;
|
||||
TC_LOG_INFO("misc", "Reloading .command information...");
|
||||
Trinity::ChatCommands::LoadCommandMap();
|
||||
handler->SendGlobalGMSysMessage("DB table `command` reloaded.");
|
||||
|
||||
// do not log this invocation, otherwise we might crash (the command table we used to get here is no longer valid!)
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, char const* /*args*/)
|
||||
|
||||
Reference in New Issue
Block a user