From 21d4d5f0de6bd8ed1cdab4f7fe6b9596dd390252 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Thu, 6 Apr 2017 17:22:23 +0200 Subject: Move clonk control specific parts into ClonkControl There are still many clonk commands hardcoded through the pass-CRSM-Commands --- src/crsm.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/crsm.hpp') diff --git a/src/crsm.hpp b/src/crsm.hpp index 87886c6..abae69a 100644 --- a/src/crsm.hpp +++ b/src/crsm.hpp @@ -29,6 +29,7 @@ #include "ClonkInterface.hpp" #include "PatchedClonkParser.hpp" +#include "PatchedClonkControl.hpp" #define CONFIG_FILE_NAME "CrServerManager.conf" #define SESSION_FILE_NAME "CrServerManager.session" @@ -76,7 +77,7 @@ public: QString value() { return Util::joinEscape({ConfigValueBase::getStringValue(config.name), ConfigValueBase::getStringValue(config.league), ConfigValueBase::getStringValue(config.wishClient)}, ':', '|'); } }; -class CRSM : public QObject, public ClonkOutputInterface +class CRSM : public QObject, public ClonkOutputInterface, public ClonkControllerInterface { friend CRSMSession::CRSMSession(CRSM *crsm); private: @@ -158,6 +159,7 @@ private: CRSMLogging Log; PatchedClonkParser parser; + PatchedClonkControl control; QList userlist; QList autolist; @@ -246,11 +248,11 @@ private: void out(const QString& text); void replayOutputBuffer(QTcpSocket *socket, bool clear = true); - void announceInfo(const QString& info); + void announceInfo(const QString& info, bool useOutgameChannel = true); bool scenAllowed(const ScenarioSettings& scen, const ClientInfo& client, UserType userType); - void kick(const QString& pcName, const QString& reason = ""); + void kick(const ClientInfo& client, const QString& reason = ""); void prepareAndConnectIrc(); -- cgit v1.2.3-54-g00ecf