diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-07 17:09:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-07 17:09:47 +0300 |
commit | 51ac76e8effd03b968a142b7bd900584d5942a59 (patch) | |
tree | 96a1dbae6a5e94b2069c2e331cc1a49a15772ae7 /src | |
parent | f50f6794a7e22ef496185cc874d14813236cdca0 (diff) | |
download | plus-51ac76e8effd03b968a142b7bd900584d5942a59.tar.gz plus-51ac76e8effd03b968a142b7bd900584d5942a59.tar.bz2 plus-51ac76e8effd03b968a142b7bd900584d5942a59.tar.xz plus-51ac76e8effd03b968a142b7bd900584d5942a59.zip |
split processWhisperResponse into two functions with net code and without.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/chathandler.cpp | 7 | ||||
-rw-r--r-- | src/net/ea/chathandler.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 52e9a7873..6e6b9927e 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -87,6 +87,12 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) { BLOCK_START("ChatHandler::processWhisperResponse") + const uint8_t type = msg.readUInt8("response"); + processWhisperResponseContinue(type); +} + +void ChatHandler::processWhisperResponseContinue(const uint8_t type) +{ std::string nick; if (mSentWhispers.empty()) { @@ -98,7 +104,6 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) mSentWhispers.pop(); } - const uint8_t type = msg.readUInt8("response"); switch (type) { case 0x00: diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index 338d49b44..e33b2433a 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -61,6 +61,8 @@ class ChatHandler notfinal : public Net::ChatHandler void processWhisperContinue(const std::string &nick, std::string chatMsg) const; + void processWhisperResponseContinue(const uint8_t type); + protected: typedef std::queue<std::string> WhisperQueue; WhisperQueue mSentWhispers; |