*Not send notification LANG_NO_CMD to SEC_PLAYER - by Machiavelli
--HG-- branch : trunk
This commit is contained in:
+3
-3
@@ -856,6 +856,8 @@ int ChatHandler::ParseCommands(const char* text)
|
|||||||
if(strlen(text) < 2)
|
if(strlen(text) < 2)
|
||||||
return 0;
|
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.
|
/// ignore messages staring from many dots.
|
||||||
if(text[0] == '.' && text[1] == '.' || text[0] == '!' && text[1] == '!')
|
if(text[0] == '.' && text[1] == '.' || text[0] == '!' && text[1] == '!')
|
||||||
return 0;
|
return 0;
|
||||||
@@ -864,9 +866,7 @@ int ChatHandler::ParseCommands(const char* text)
|
|||||||
if(text[0] == '!' || text[0] == '.')
|
if(text[0] == '!' || text[0] == '.')
|
||||||
++text;
|
++text;
|
||||||
|
|
||||||
std::string fullcmd = text; // original `text` can't be used. It content destroyed in command code processing.
|
if(!ExecuteCommandInTable(getCommandTable(), text, fullcmd) && m_session->GetSecurity() > SEC_PLAYER)
|
||||||
|
|
||||||
if(!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
|
|
||||||
SendSysMessage(LANG_NO_CMD);
|
SendSysMessage(LANG_NO_CMD);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user