}
}
+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
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);
}
-void IrcServerHandler::handlePing(const QString &prefix, const QList<QByteArray> ¶ms) {
- Q_UNUSED(prefix);
- putCmd("PONG", params);
-}
-
void IrcServerHandler::handlePrivmsg(const QString &prefix, const QList<QByteArray> ¶ms) {
if(!checkParamCount("IrcServerHandler::handlePrivmsg()", params, 1))
return;
public slots:
void handleNotice(const QString &prefix, const QList<QByteArray> ¶ms);
- void handlePing(const QString &prefix, const QList<QByteArray> ¶ms);
void handlePrivmsg(const QString &prefix, const QList<QByteArray> ¶ms);
void defaultHandler(QString cmd, const QString &prefix, const QList<QByteArray> ¶ms);