summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp4
-rw-r--r--src/net/chathandler.h2
-rw-r--r--src/net/ea/chathandler.cpp6
-rw-r--r--src/net/ea/chathandler.h2
4 files changed, 14 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index bcaba2a40..e2ce0af74 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -75,6 +75,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/desktop.h"
+#include "net/chathandler.h"
#include "net/gamehandler.h"
#include "net/generalhandler.h"
#include "net/guildhandler.h"
@@ -823,6 +824,9 @@ void Client::gameClear()
if (Net::getLoginHandler())
Net::getLoginHandler()->clearWorlds();
+ if (Net::getChatHandler())
+ Net::getChatHandler()->clear();
+
#ifdef USE_MUMBLE
delete mumbleManager;
mumbleManager = nullptr;
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index 9fe65499c..e91be671c 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -52,6 +52,8 @@ class ChatHandler
virtual void ignoreAll() const = 0;
virtual void unIgnoreAll() const = 0;
+
+ virtual void clear() = 0;
};
} // namespace Net
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 6346f63ff..265f59cb1 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -53,6 +53,12 @@ ChatHandler::ChatHandler() :
{
}
+void ChatHandler::clear()
+{
+ mShowMotd = config.getBoolValue("showmotd");
+ mSkipping = true;
+}
+
void ChatHandler::me(const std::string &text, const std::string &channel) const
{
// here need string duplication
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 5ceccc0c2..49909ad6f 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -55,6 +55,8 @@ class ChatHandler : public Net::ChatHandler
virtual void processIgnoreAllResponse(Net::MessageIn &msg) const;
+ void clear() override final;
+
protected:
typedef std::queue<std::string> WhisperQueue;
WhisperQueue mSentWhispers;