diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-07 15:40:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-07 15:42:57 +0300 |
commit | 201d66ca502db6602911ce69288d2adb975bba2d (patch) | |
tree | 8acab2d3a1c73734f16c2024356d810b01bdfa4a /src/net/tmwa | |
parent | ee5643e7412f366241568fb206a75715f9902aa3 (diff) | |
download | plus-201d66ca502db6602911ce69288d2adb975bba2d.tar.gz plus-201d66ca502db6602911ce69288d2adb975bba2d.tar.bz2 plus-201d66ca502db6602911ce69288d2adb975bba2d.tar.xz plus-201d66ca502db6602911ce69288d2adb975bba2d.zip |
Move processWhisper from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 15 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index dbe3c09a8..15f65fe90 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -365,4 +365,19 @@ void ChatHandler::processChat(Net::MessageIn &msg) BLOCK_END("ChatHandler::processChat") } +void ChatHandler::processWhisper(Net::MessageIn &msg) const +{ + BLOCK_START("ChatHandler::processWhisper") + const int chatMsgLength = msg.readInt16("len") - 28; + std::string nick = msg.readString(24, "nick"); + + if (chatMsgLength <= 0) + { + BLOCK_END("ChatHandler::processWhisper") + return; + } + + processWhisperContinue(nick, msg.readString(chatMsgLength, "message")); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index a9f5ce352..e548fbff9 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -61,6 +61,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler protected: void processChat(Net::MessageIn &msg); + + void processWhisper(Net::MessageIn &msg) const; }; } // namespace TmwAthena |