summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index ad8c3bcdc..b8973dd66 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -55,6 +55,7 @@ ChatHandler::ChatHandler() :
SMSG_WHISPER,
SMSG_WHISPER_RESPONSE,
SMSG_GM_CHAT,
+ SMSG_GM_CHAT2,
SMSG_MVP, // MVP
SMSG_IGNORE_ALL_RESPONSE,
SMSG_COLOR_MESSAGE,
@@ -88,6 +89,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processChat(msg);
break;
+ case SMSG_GM_CHAT2:
+ processGmChat2(msg);
+ break;
+
case SMSG_MVP:
processMVP(msg);
break;
@@ -313,6 +318,19 @@ void ChatHandler::processChat(Net::MessageIn &msg)
BLOCK_END("ChatHandler::processChat")
}
+void ChatHandler::processGmChat2(Net::MessageIn &msg)
+{
+ int chatMsgLength = msg.readInt16("len") - 16;
+ msg.readInt32("font color");
+ msg.readInt16("font type");
+ msg.readInt16("font size");
+ msg.readInt16("font align");
+ msg.readInt16("font y");
+ const std::string chatMsg = msg.readRawString(chatMsgLength, "message");
+ if (chatWindow)
+ chatWindow->addGlobalMessage(chatMsg);
+}
+
void ChatHandler::processWhisper(Net::MessageIn &msg) const
{
BLOCK_START("ChatHandler::processWhisper")