diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-27 21:55:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-27 21:55:36 +0300 |
commit | edfc1181738ac3cb0228006952361cd8cf3a35fb (patch) | |
tree | 7a498b67590112e2a56e0a776490256ed721e54e | |
parent | 23e227e36a506716109ca8a4a0f4b783d6cc2fce (diff) | |
download | manaverse-edfc1181738ac3cb0228006952361cd8cf3a35fb.tar.gz manaverse-edfc1181738ac3cb0228006952361cd8cf3a35fb.tar.bz2 manaverse-edfc1181738ac3cb0228006952361cd8cf3a35fb.tar.xz manaverse-edfc1181738ac3cb0228006952361cd8cf3a35fb.zip |
Add exception to seach chat command. It not run search for special chars.
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 3b074e64f..de3713482 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -384,10 +384,19 @@ void ChatTab::chatInput(const std::string &message) handleCommandStr(std::string(msg, 1)); break; case '?': - if (msg.size() > 1) + if (msg.size() > 1 && + msg[1] != '!' && + msg[1] != '?' && + msg[1] != '.' && + msg[1] != ' ' && + msg[1] != ',') + { handleHelp(std::string(msg, 1)); + } else + { handleInput(msg); + } break; default: handleInput(msg); |