summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 15:38:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 15:38:09 +0300
commitee5643e7412f366241568fb206a75715f9902aa3 (patch)
tree2bbc61079985bd20f585ecccd9b5c1ca39edce18 /src
parent0fd358d0ebeb02f232f51eb669959c4d210f15cb (diff)
downloadplus-ee5643e7412f366241568fb206a75715f9902aa3.tar.gz
plus-ee5643e7412f366241568fb206a75715f9902aa3.tar.bz2
plus-ee5643e7412f366241568fb206a75715f9902aa3.tar.xz
plus-ee5643e7412f366241568fb206a75715f9902aa3.zip
separate processWhisper into two functions. With netcode and without.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/chathandler.cpp7
-rw-r--r--src/net/ea/chathandler.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index d835437e8..bd0adf77e 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -147,7 +147,12 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) const
return;
}
- std::string chatMsg = msg.readString(chatMsgLength);
+ processWhisperContinue(nick, msg.readString(chatMsgLength, "message"));
+}
+
+void ChatHandler::processWhisperContinue(const std::string &nick,
+ std::string chatMsg) const
+{
// ignoring future whisper messages
if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0)
{
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 897949432..c541e0860 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -60,6 +60,9 @@ class ChatHandler notfinal : public Net::ChatHandler
void clear() override final;
+ void processWhisperContinue(const std::string &nick,
+ std::string chatMsg) const;
+
protected:
typedef std::queue<std::string> WhisperQueue;
WhisperQueue mSentWhispers;