summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-26 01:25:42 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-26 01:26:54 +0300
commit399f264360f6e8dfa31d0c3ff7d72aad8033888d (patch)
tree38c3dcbba51c8c1b0830656dd2a149faaa1549f5
parent84e56a88817f7178b4895e2adf863b4d98b42e64 (diff)
downloadmanaplus-399f264360f6e8dfa31d0c3ff7d72aad8033888d.tar.gz
manaplus-399f264360f6e8dfa31d0c3ff7d72aad8033888d.tar.bz2
manaplus-399f264360f6e8dfa31d0c3ff7d72aad8033888d.tar.xz
manaplus-399f264360f6e8dfa31d0c3ff7d72aad8033888d.zip
Ignore future message type in whisper.
-rw-r--r--src/net/ea/chathandler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 0ab2c903c..6aea0e2f8 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -154,6 +154,10 @@ void ChatHandler::processWhisper(Net::MessageIn &msg)
return;
std::string chatMsg = msg.readString(chatMsgLength);
+ // ignoring future whisper messages
+ if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0)
+ return;
+ // remove first unicode space if this is may be whisper command.
if (chatMsg.find("\302\202!") == 0)
chatMsg = chatMsg.substr(2);