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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index beae2731b..df1c45155 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -60,6 +60,7 @@ ChatHandler::ChatHandler() :
SMSG_IGNORE_ALL_RESPONSE,
SMSG_COLOR_MESSAGE,
SMSG_CHAT_IGNORE_LIST,
+ SMSG_FORMAT_MESSAGE,
0
};
handledMessages = _messages;
@@ -88,6 +89,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processChat(msg);
break;
+ case SMSG_FORMAT_MESSAGE:
+ processFormatMessage(msg);
+ break;
+
case SMSG_COLOR_MESSAGE:
processColorChat(msg);
break;
@@ -279,6 +284,15 @@ void ChatHandler::processChat(Net::MessageIn &msg)
processChatContinue(msg.readRawString(chatMsgLength, "message"));
}
+void ChatHandler::processFormatMessage(Net::MessageIn &msg)
+{
+ BLOCK_START("ChatHandler::processChat")
+ int msgId = msg.readInt16("msg id");
+ // +++ here need load message from configuration file
+ const std::string chatMsg = strprintf("Message #%d", msgId);
+ processChatContinue(chatMsg);
+}
+
void ChatHandler::processColorChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")