From 0993b1fcb5f2d33543bfd61f4ddb91a7a2db6086 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Fri, 6 Aug 2010 23:21:58 +0200 Subject: * Fixes for Linux build. --HG-- branch : trunk --- src/server/game/Chat/Chat.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/game/Chat/Chat.cpp') diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 26e07ab62c3..d3e153e3a89 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -959,9 +959,9 @@ void ChatHandler::PSendSysMessage(const char *format, ...) SendSysMessage(str); } -bool ChatHandler::ExecuteCommandInTables(std::vector& tables, const char* text, const std::string& fullcmd) +bool ChatHandler::ExecuteCommandInTables(std::vector const& tables, const char* text, const std::string& fullcmd) { - for (std::vector::iterator it = tables.begin(); it != tables.end(); ++it) + for (std::vector::const_iterator it = tables.begin(); it != tables.end(); ++it) if (ExecuteCommandInTable((*it), text, fullcmd)) return true; @@ -1125,7 +1125,8 @@ int ChatHandler::ParseCommands(const char* text) if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd)) { - if (!ExecuteCommandInTables(sScriptMgr.GetChatCommands(), text, fullcmd)) + std::vector const& tables = sScriptMgr.GetChatCommands(); + if (!ExecuteCommandInTables(tables, text, fullcmd)) { if (m_session && m_session->GetSecurity() == SEC_PLAYER) return 0; -- cgit v1.2.3