From 8bd7d77ba07d84b7829201befe30c07b12c5568a Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Tue, 30 May 2017 20:27:57 +0200 Subject: Move IngameChat functionality into its own ClonkOutputInterface --- src/IrcIngameChat.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/IrcIngameChat.hpp (limited to 'src/IrcIngameChat.hpp') diff --git a/src/IrcIngameChat.hpp b/src/IrcIngameChat.hpp new file mode 100644 index 0000000..2ced7e3 --- /dev/null +++ b/src/IrcIngameChat.hpp @@ -0,0 +1,18 @@ +#pragma once +#include "ClonkInterface.hpp" + +class CRSM; + +class IrcIngameChat : public ClonkOutputInterface { + const QString& channel; + CRSM& crsm; + +public: + IrcIngameChat(const QString& channel, CRSM& crsm); + bool clientConnected(const ClientInfo & client) override; + bool clientMessage(ClientInfo & client, const QString & message, ClonkOutputInterface::MessageType type, const QTime & time) override; + bool clientRemoved(const ClientInfo & client, const QString & reason) override; + +private: + void sendChannelMessage(const QString& message, bool action); +}; -- cgit v1.2.3-54-g00ecf