diff options
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rw-r--r-- | src/server/game/Chat/Chat.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index fbf91d9d70d..2bce0e52b8a 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -35,11 +35,6 @@ #include "World.h" #include <boost/algorithm/string/replace.hpp> -ChatCommand::ChatCommand(char const* name, uint32 permission, bool allowConsole, pHandler handler, std::string help, std::vector<ChatCommand> childCommands /*= std::vector<ChatCommand>()*/) - : Name(ASSERT_NOTNULL(name)), Permission(permission), AllowConsole(allowConsole), Handler(handler), Help(std::move(help)), ChildCommands(std::move(childCommands)) -{ -} - // Lazy loading of the command table cache from commands and the // ScriptMgr should be thread safe since the player commands, // cli commands and ScriptMgr updates are all dispatched one after @@ -306,12 +301,12 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c } // must be available and have handler - if (!table[i].Handler || !isAvailable(table[i])) + if (!table[i].HasHandler() || !isAvailable(table[i])) continue; SetSentErrorMessage(false); // table[i].Name == "" is special case: send original command to handler - if ((table[i].Handler)(this, table[i].Name[0] != '\0' ? text : oldtext)) + if (table[i](this, table[i].Name[0] != '\0' ? text : oldtext)) { if (!m_session) // ignore console return true; |