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/crsm.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/crsm.hpp') diff --git a/src/crsm.hpp b/src/crsm.hpp index 61f3cca..4e3aa34 100644 --- a/src/crsm.hpp +++ b/src/crsm.hpp @@ -31,6 +31,8 @@ #include "PatchedClonkParser.hpp" #include "PatchedClonkControl.hpp" +#include "IrcIngameChat.hpp" + #define CONFIG_FILE_NAME "CrServerManager.conf" #define SESSION_FILE_NAME "CrServerManager.session" #define CUR_SCEN_FILE_NAME "curscen.txt" @@ -125,6 +127,7 @@ public: bool rawTimed(const QString& line, const QTime& time); bool playerRemoved(const QString &name); + void sendIrcMessage(const QString& message, const QString& target, bool action, bool notice, bool noticeOrDCC = false); signals: private slots: @@ -162,6 +165,8 @@ private: PatchedClonkParser parser; PatchedClonkControl control; + IrcIngameChat ingameChat; + QList userlist; QList autolist; QList nextAutoScens; @@ -229,6 +234,7 @@ private: QStringList listC4Folder(const QString &path); void ircSetIngameChannelTopic(); void setSessionState(CRSMSession::SessionState state); + void unRegisterIngameChat(); void addCommand(const QString& name, CmdFunction func, int interfaces = Clonk | IRC, UserType userType = User, const QString& shortDescription = "", const QString &argList = "", const QString &longDescription = ""); inline void addCommandGroup(const QString& name, int interfaces = Clonk | IRC, UserType userType = User, const QString& shortDescription = "", const QString &longDescription = "", CmdFunction defaultFunc = &CRSM::groupinfo); @@ -276,7 +282,6 @@ private: void removeCommandSuffixes(QString& command); void substituteCommandAlias(QString& command); QString clientModName(const ClientInfo& client); - void sendIrcMessage(const QString& message, const QString& target, bool action, bool notice, bool noticeOrDCC = false); bool greetAllowed(const ClientInfo& client); void handleIrcMessage(const ClientInfo& client, QString message, const QString& target, bool privateMessage, bool action, bool own = false); -- cgit v1.2.3-54-g00ecf