From 201d66ca502db6602911ce69288d2adb975bba2d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Sep 2014 15:40:45 +0300 Subject: Move processWhisper from ea namespace into eathena and tmwa. --- src/net/tmwa/chathandler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/tmwa/chathandler.cpp') 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 -- cgit v1.2.3-70-g09d2