aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Chat.cpp
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2010-08-06 23:21:58 +0200
committerXTZGZoReX <none@none>2010-08-06 23:21:58 +0200
commit0993b1fcb5f2d33543bfd61f4ddb91a7a2db6086 (patch)
tree347a549a63c8b3220a633ddf29b6d335a0d387da /src/server/game/Chat/Chat.cpp
parentf413d609083a46ad57668e2f1ddd72ff417e22ed (diff)
* Fixes for Linux build.
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rw-r--r--src/server/game/Chat/Chat.cpp7
1 files changed, 4 insertions, 3 deletions
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<ChatCommand*>& tables, const char* text, const std::string& fullcmd)
+bool ChatHandler::ExecuteCommandInTables(std::vector<ChatCommand*> const& tables, const char* text, const std::string& fullcmd)
{
- for (std::vector<ChatCommand*>::iterator it = tables.begin(); it != tables.end(); ++it)
+ for (std::vector<ChatCommand*>::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<ChatCommand*> const& tables = sScriptMgr.GetChatCommands();
+ if (!ExecuteCommandInTables(tables, text, fullcmd))
{
if (m_session && m_session->GetSecurity() == SEC_PLAYER)
return 0;