summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-24 20:20:20 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-24 20:20:20 +0300
commit8d9174b86d85474f3ebd6314232864c8d0c575ce (patch)
tree8f88622653bc0f36dcd9d5b32616d722a80f0ba1 /src/net/ea
parent008209179885ab96ad37252d2b4201eff0aca437 (diff)
downloadplus-8d9174b86d85474f3ebd6314232864c8d0c575ce.tar.gz
plus-8d9174b86d85474f3ebd6314232864c8d0c575ce.tar.bz2
plus-8d9174b86d85474f3ebd6314232864c8d0c575ce.tar.xz
plus-8d9174b86d85474f3ebd6314232864c8d0c575ce.zip
add option to show motd message.
Disabled by default.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/chathandler.cpp8
-rw-r--r--src/net/ea/chathandler.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 90c6be5bc..deaef6984 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -47,7 +47,8 @@ namespace Ea
ChatHandler::ChatHandler() :
mSentWhispers(),
- mShowAllLang(serverConfig.getValue("showAllLang", 0))
+ mShowAllLang(serverConfig.getValue("showAllLang", 0)),
+ mShowMotd(config.getBoolValue("showmotd"))
{
}
@@ -355,7 +356,10 @@ void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
trim(chatMsg);
if (player_node)
- player_node->setSpeech(chatMsg, channel);
+ {
+ if (chatWindow || mShowMotd)
+ player_node->setSpeech(chatMsg, channel);
+ }
}
else if (localChatTab)
{
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 124cc41fb..3f0e054a5 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -59,6 +59,7 @@ class ChatHandler : public Net::ChatHandler
typedef std::queue<std::string> WhisperQueue;
WhisperQueue mSentWhispers;
bool mShowAllLang;
+ bool mShowMotd;
};
} // namespace Ea