- handle(ctcpcmd, Q_ARG(CtcpType, ctcptype), Q_ARG(QString, prefix), Q_ARG(QString, target), Q_ARG(QString, ctcpparam));
+ spacePos = ctcp.indexOf(' ');
+ if(spacePos != -1) {
+ ctcpcmd = userDecode(target, ctcp.left(spacePos));
+ ctcpparam = userDecode(target, ctcp.mid(spacePos + 1));
+ } else {
+ ctcpcmd = userDecode(target, ctcp);
+ ctcpparam = QString();
+ }
+
+ if(!_ignoreListManager->ctcpMatch(prefix, network()->networkName(), ctcpcmd.toUpper())) {
+ QString reply_;
+ handle(ctcpcmd, Q_ARG(CtcpType, ctcptype), Q_ARG(QString, prefix), Q_ARG(QString, target), Q_ARG(QString, ctcpparam), Q_ARG(QString, reply_));
+ if(ctcptype == CtcpQuery && !reply_.isNull()) {
+ replies << lowLevelQuote(pack(serverEncode(ctcpcmd), userEncode(nickFromMask(prefix), reply_)));
+ }
+ }