From 8d293c276c5b91d9a2c22c28a38d2edce8e36501 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 28 Dec 2008 09:17:48 +0100 Subject: *Not send notification LANG_NO_CMD to SEC_PLAYER - by Machiavelli --HG-- branch : trunk --- src/game/Chat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/Chat.cpp') 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; -- cgit v1.2.3