From: Manuel Nickschas Date: Wed, 13 Oct 2010 21:22:45 +0000 (+0200) Subject: Event backend porting X-Git-Tag: 0.8-beta1~87 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=29a45f620131394d4b80ad8c4a58b8acb359df76 Event backend porting PING --- diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index bb2c211b..d5649730 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -302,6 +302,12 @@ void CoreSessionEventProcessor::processIrcEventPart(IrcEvent *e) { } } +void CoreSessionEventProcessor::processIrcEventPing(IrcEvent *e) { + QString param = e->params().count()? e->params().first() : QString(); + // FIXME use events + coreNetwork(e)->putRawLine("PONG " + coreNetwork(e)->serverEncode(param)); +} + void CoreSessionEventProcessor::processIrcEventPong(IrcEvent *e) { // the server is supposed to send back what we passed as param. and we send a timestamp // but using quote and whatnought one can send arbitrary pings, so we have to do some sanity checks diff --git a/src/core/coresessioneventprocessor.h b/src/core/coresessioneventprocessor.h index 258dc44b..b99a778d 100644 --- a/src/core/coresessioneventprocessor.h +++ b/src/core/coresessioneventprocessor.h @@ -47,6 +47,7 @@ public: Q_INVOKABLE void processIrcEventMode(IrcEvent *event); Q_INVOKABLE void processIrcEventNick(IrcEvent *event); Q_INVOKABLE void processIrcEventPart(IrcEvent *event); + Q_INVOKABLE void processIrcEventPing(IrcEvent *event); Q_INVOKABLE void processIrcEventPong(IrcEvent *event); Q_INVOKABLE void processIrcEventQuit(IrcEvent *event); Q_INVOKABLE void lateProcessIrcEventQuit(IrcEvent *event); diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 36381294..235f7d5e 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -181,11 +181,6 @@ void IrcServerHandler::handleNotice(const QString &prefix, const QList ¶ms) { - Q_UNUSED(prefix); - putCmd("PONG", params); -} - void IrcServerHandler::handlePrivmsg(const QString &prefix, const QList ¶ms) { if(!checkParamCount("IrcServerHandler::handlePrivmsg()", params, 1)) return; diff --git a/src/core/ircserverhandler.h b/src/core/ircserverhandler.h index a457b30c..52ecb6a5 100644 --- a/src/core/ircserverhandler.h +++ b/src/core/ircserverhandler.h @@ -35,7 +35,6 @@ public: public slots: void handleNotice(const QString &prefix, const QList ¶ms); - void handlePing(const QString &prefix, const QList ¶ms); void handlePrivmsg(const QString &prefix, const QList ¶ms); void defaultHandler(QString cmd, const QString &prefix, const QList ¶ms);