diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 15 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 1a5006166..f10f8fcfb 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -312,4 +312,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 EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 397f947ff..309216a5f 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/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 EAthena |