summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-13 19:07:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-13 19:07:55 +0300
commit3aebacaab2e110820994b7e0849bf65fa24c7c8c (patch)
treea71d29a6e12ed2ef72ebc469527c2dfb3c9b7687 /src/net/eathena
parent78bda42e4b456ad7118b8e46a07c77371f90b615 (diff)
downloadmanaplus-3aebacaab2e110820994b7e0849bf65fa24c7c8c.tar.gz
manaplus-3aebacaab2e110820994b7e0849bf65fa24c7c8c.tar.bz2
manaplus-3aebacaab2e110820994b7e0849bf65fa24c7c8c.tar.xz
manaplus-3aebacaab2e110820994b7e0849bf65fa24c7c8c.zip
Split processChat into two functions with net code and without.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp6
-rw-r--r--src/net/eathena/chathandler.h2
2 files changed, 7 insertions, 1 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);