summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-17 15:54:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-17 15:54:03 +0300
commit879615bf93c0a4159ca68a1fc07657370c79950d (patch)
tree779fe86cf943a953997c67c31b11c92df26f2900 /src/net/ea/chathandler.cpp
parentc4802097dec05ca39e395e7dba3a55dba70edbe8 (diff)
downloadmv-879615bf93c0a4159ca68a1fc07657370c79950d.tar.gz
mv-879615bf93c0a4159ca68a1fc07657370c79950d.tar.bz2
mv-879615bf93c0a4159ca68a1fc07657370c79950d.tar.xz
mv-879615bf93c0a4159ca68a1fc07657370c79950d.zip
Add static in chathandler.
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 4e5d2300b..4fe3cae63 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -51,13 +51,20 @@
namespace Ea
{
-ChatHandler::ChatHandler() :
- mSentWhispers(),
- mMotdTime(-1),
- mShowAllLang(serverConfig.getValue("showAllLang", 0)),
- mShowMotd(config.getBoolValue("showmotd")),
- mSkipping(true)
+WhisperQueue ChatHandler::mSentWhispers;
+int ChatHandler::mMotdTime = -1;
+bool ChatHandler::mShowAllLang = false;
+bool ChatHandler::mShowMotd = false;
+bool ChatHandler::mSkipping = true;
+
+ChatHandler::ChatHandler()
{
+ if (!mSentWhispers.empty())
+ mSentWhispers.pop();
+ mMotdTime = -1;
+ mShowAllLang = serverConfig.getValue("showAllLang", 0);
+ mShowMotd = config.getBoolValue("showmotd");
+ mSkipping = true;
}
void ChatHandler::clear()
@@ -157,7 +164,7 @@ void ChatHandler::processWhisperResponseContinue(const uint8_t type)
}
void ChatHandler::processWhisperContinue(const std::string &nick,
- std::string chatMsg) const
+ std::string chatMsg)
{
// ignoring future whisper messages
if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0)
@@ -277,7 +284,7 @@ void ChatHandler::processWhisperContinue(const std::string &nick,
BLOCK_END("ChatHandler::processWhisper")
}
-void ChatHandler::processBeingChat(Net::MessageIn &msg) const
+void ChatHandler::processBeingChat(Net::MessageIn &msg)
{
if (!actorManager)
return;
@@ -356,7 +363,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg) const
BLOCK_END("ChatHandler::processBeingChat")
}
-void ChatHandler::processMVP(Net::MessageIn &msg) const
+void ChatHandler::processMVP(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processMVP")
// Display MVP player
@@ -372,7 +379,7 @@ void ChatHandler::processMVP(Net::MessageIn &msg) const
BLOCK_END("ChatHandler::processMVP")
}
-void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg) const
+void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processIgnoreAllResponse")
const uint8_t action = msg.readUInt8("action");