aboutsummaryrefslogtreecommitdiff
path: root/src/game/Chat.cpp
diff options
context:
space:
mode:
authorBlaymoira <none@none>2008-12-28 09:17:48 +0100
committerBlaymoira <none@none>2008-12-28 09:17:48 +0100
commit8d293c276c5b91d9a2c22c28a38d2edce8e36501 (patch)
tree3bf79a8d1488be8838614b213f1931f1956505a3 /src/game/Chat.cpp
parentdc29c2d2524e2e1c052506ae17cfc90b37a3bc56 (diff)
*Not send notification LANG_NO_CMD to SEC_PLAYER - by Machiavelli
--HG-- branch : trunk
Diffstat (limited to 'src/game/Chat.cpp')
-rw-r--r--src/game/Chat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 203f8f6c624..1beb78b9419 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -856,6 +856,8 @@ int ChatHandler::ParseCommands(const char* text)
if(strlen(text) < 2)
return 0;
+ std::string fullcmd = text; // 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;
@@ -864,9 +866,7 @@ int ChatHandler::ParseCommands(const char* text)
if(text[0] == '!' || text[0] == '.')
++text;
- std::string fullcmd = text; // original `text` can't be used. It content destroyed in command code processing.
-
- if(!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
+ if(!ExecuteCommandInTable(getCommandTable(), text, fullcmd) && m_session->GetSecurity() > SEC_PLAYER)
SendSysMessage(LANG_NO_CMD);
return 1;