summaryrefslogtreecommitdiff
path: root/src/net/tmwa/chathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/chathandler.cpp')
-rw-r--r--src/net/tmwa/chathandler.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index a11c6149f..78d0f86ab 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -62,6 +62,7 @@ ChatHandler::ChatHandler() :
SMSG_GM_CHAT,
SMSG_MVP_EFFECT,
SMSG_IGNORE_ALL_RESPONSE,
+ SMSG_SCRIPT_MESSAGE,
0
};
handledMessages = _messages;
@@ -103,6 +104,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processIgnoreAllResponse(msg);
break;
+ case SMSG_SCRIPT_MESSAGE:
+ processScriptMessage(msg);
+ break;
+
default:
break;
}
@@ -622,6 +627,14 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
BLOCK_END("ChatHandler::processBeingChat")
}
+void ChatHandler::processScriptMessage(Net::MessageIn &msg)
+{
+ const int sz = msg.readInt16("len") - 5;
+ msg.readUInt8("message type");
+ const std::string message = msg.readString(sz, "message");
+ localChatTab->chatLog(message, ChatMsgType::BY_SERVER);
+}
+
void ChatHandler::talkPet(const std::string &restrict text,
const std::string &restrict channel) const
{