diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 7 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 3 |
4 files changed, 16 insertions, 2 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 22ec532ce..31a585cf9 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -280,7 +280,11 @@ void ChatHandler::processChat(Net::MessageIn &msg) return; } - std::string chatMsg = msg.readRawString(chatMsgLength, "message"); + processChatContinue(msg.readRawString(chatMsgLength, "message")); +} + +void ChatHandler::processChatContinue(std::string chatMsg) +{ const size_t pos = chatMsg.find(" : ", 0); bool allow(true); diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index b59019fef..0b70f6d1f 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -73,6 +73,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler protected: void processChat(Net::MessageIn &msg); + void processChatContinue(std::string chatMsg); + void processWhisper(Net::MessageIn &msg) const; void processWhisperResponse(Net::MessageIn &msg); diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 93f1d9815..962d21363 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -290,7 +290,12 @@ void ChatHandler::processChat(Net::MessageIn &msg) return; } - std::string chatMsg = msg.readRawString(chatMsgLength, "message"); + processChatContinue(msg.readRawString(chatMsgLength, "message"), channel); +} + +void ChatHandler::processChatContinue(std::string chatMsg, + const std::string &channel) +{ const size_t pos = chatMsg.find(" : ", 0); bool allow(true); diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index 83b23774b..0fbf6711a 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -73,6 +73,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler protected: void processChat(Net::MessageIn &msg); + void processChatContinue(std::string chatMsg, + const std::string &channel); + void processGmChat(Net::MessageIn &msg); void processWhisper(Net::MessageIn &msg) const; |