summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index deaef6984..0c34291c4 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -48,7 +48,8 @@ namespace Ea
ChatHandler::ChatHandler() :
mSentWhispers(),
mShowAllLang(serverConfig.getValue("showAllLang", 0)),
- mShowMotd(config.getBoolValue("showmotd"))
+ mShowMotd(config.getBoolValue("showmotd")),
+ mSkipping(true)
{
}
@@ -311,7 +312,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg,
}
void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
- const bool channels) const
+ const bool channels)
{
BLOCK_START("ChatHandler::processChat")
int chatMsgLength = msg.readInt16() - 4;
@@ -334,6 +335,15 @@ void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
if (normalChat)
{
+ if (chatMsg.find(": ") == std::string::npos && !mShowMotd
+ && mSkipping && channel.empty())
+ {
+ // skip motd from "new" tmw server
+ return;
+ }
+
+ mSkipping = true;
+
if (chatWindow)
{
chatWindow->resortChatLog(chatMsg, BY_PLAYER,