X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.h;h=b2ba39c2f73f65bac4361920eb8ff8664f550c59;hb=2ed35d8a6322e49ab604472a7af59592cf36ae12;hp=7b359d070ddcc2f0fac6a467155b2b8610c16f8c;hpb=712781ef33198acb7267e02ee6f8f9bfc8598d5a;p=quassel.git diff --git a/src/core/coresessioneventprocessor.h b/src/core/coresessioneventprocessor.h index 7b359d07..b2ba39c2 100644 --- a/src/core/coresessioneventprocessor.h +++ b/src/core/coresessioneventprocessor.h @@ -21,15 +21,17 @@ #ifndef CORESESSIONEVENTPROCESSOR_H #define CORESESSIONEVENTPROCESSOR_H +#include "basichandler.h" #include "corenetwork.h" #include "networkevent.h" class CoreSession; +class CtcpEvent; class IrcEvent; class IrcEventNumeric; class Netsplit; -class CoreSessionEventProcessor : public QObject { +class CoreSessionEventProcessor : public BasicHandler { Q_OBJECT public: @@ -82,6 +84,19 @@ public: // Q_INVOKABLE void processIrcEvent(IrcEvent *event); + /* CTCP handlers */ + Q_INVOKABLE void processCtcpEvent(CtcpEvent *event); + + Q_INVOKABLE void handleCtcpAction(CtcpEvent *event); + Q_INVOKABLE void handleCtcpClientinfo(CtcpEvent *event); + Q_INVOKABLE void handleCtcpPing(CtcpEvent *event); + Q_INVOKABLE void handleCtcpTime(CtcpEvent *event); + Q_INVOKABLE void handleCtcpVersion(CtcpEvent *event); + Q_INVOKABLE void defaultHandler(const QString &ctcpCmd, CtcpEvent *event); + +signals: + void newEvent(Event *event); + protected: bool checkParamCount(IrcEvent *event, int minParams); inline CoreNetwork *coreNetwork(NetworkEvent *e) const { return qobject_cast(e->network()); }