aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 88c3de274fb..7faf05a577c 100755
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -425,7 +425,7 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, char const* text,
return false;
}
-int ChatHandler::ParseCommands(char const* text)
+bool ChatHandler::ParseCommands(char const* text)
{
ASSERT(text);
ASSERT(*text);
@@ -433,23 +433,23 @@ int ChatHandler::ParseCommands(char const* text)
std::string fullcmd = text;
if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity()) && !sWorld->getBoolConfig(CONFIG_ALLOW_PLAYER_COMMANDS))
- return 0;
+ return false;
/// chat case (.command or !command format)
if (m_session)
{
if (text[0] != '!' && text[0] != '.')
- return 0;
+ return false;
}
/// ignore single . and ! in line
if (strlen(text) < 2)
- return 0;
+ return false;
// original `text` can't be used. It content destroyed in command code processing.
/// ignore messages staring from many dots.
if ((text[0] == '.' && text[1] == '.') || (text[0] == '!' && text[1] == '!'))
- return 0;
+ return false;
/// skip first . or ! (in console allowed use command with . and ! and without its)
if (text[0] == '!' || text[0] == '.')
@@ -458,11 +458,11 @@ int ChatHandler::ParseCommands(char const* text)
if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
{
if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity()))
- return 0;
+ return false;
SendSysMessage(LANG_NO_CMD);
}
- return 1;
+ return true;
}
bool ChatHandler::isValidChatMessage(char const* message)