X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fctcphandler.cpp;fp=src%2Fcore%2Fctcphandler.cpp;h=6a28f5e9be0c7ae2d7ee31cfb5a20633f4619de7;hp=655f1700408189af13cf3f9cd81b36b10b8cc1b1;hb=91aec4cd6a4a59dc42e18e31d69691f4499b8520;hpb=9e4d32bf1a0a942c28b30901e7da196ab3ebfad5 diff --git a/src/core/ctcphandler.cpp b/src/core/ctcphandler.cpp index 655f1700..6a28f5e9 100644 --- a/src/core/ctcphandler.cpp +++ b/src/core/ctcphandler.cpp @@ -188,6 +188,20 @@ void CtcpHandler::handleAction(CtcpType ctcptype, const QString &prefix, const Q emit displayMsg(Message::Action, typeByTarget(target), target, param, prefix); } +void CtcpHandler::handleClientinfo(CtcpType ctcptype, const QString &prefix, const QString &target, const QString ¶m) { + Q_UNUSED(target) + if(ctcptype == CtcpQuery) { + if(_ignoreListManager->ctcpMatch(prefix, network()->networkName(), "CLIENTINFO")) + return; + reply(nickFromMask(prefix), "CLIENTINFO", QString("ACTION CLIENTINFO PING TIME VERSION")); + emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("Received CTCP CLIENTINFO request from %1").arg(prefix)); + } else { + // display clientinfo answer + emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("Received CTCP CLIENTINFO answer from %1: %2") + .arg(nickFromMask(prefix)).arg(param)); + } +} + void CtcpHandler::handlePing(CtcpType ctcptype, const QString &prefix, const QString &target, const QString ¶m) { Q_UNUSED(target) if(ctcptype == CtcpQuery) {