X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fctcpparser.cpp;h=7619a697041826e76f3d9dacb6c41c7f88747d9b;hp=fc710573ecda1d186b31a1b9785bf457273b4ac9;hb=36ea1791352d34e34b6c6cdef02455a4c43acc17;hpb=1a2a0f1880d6c30166928addbfb7b11849ff15cc diff --git a/src/core/ctcpparser.cpp b/src/core/ctcpparser.cpp index fc710573..7619a697 100644 --- a/src/core/ctcpparser.cpp +++ b/src/core/ctcpparser.cpp @@ -188,7 +188,8 @@ void CtcpParser::parse(IrcEventRawMessage *e, Message::Type messagetype) { } if(!ctcpEvents.isEmpty()) { _replies.insert(uuid, CtcpReply(coreNetwork(e), nickFromMask(e->prefix()))); - CtcpEvent *flushEvent = new CtcpEvent(uuid); + CtcpEvent *flushEvent = new CtcpEvent(EventManager::CtcpEventFlush, e->network(), e->prefix(), e->target(), + ctcptype, "INVALID", QString(), e->timestamp(), uuid); ctcpEvents << flushEvent; foreach(CtcpEvent *event, ctcpEvents) { coreSession()->eventManager()->sendEvent(event); @@ -214,7 +215,8 @@ void CtcpParser::sendCtcpEvent(CtcpEvent *e) { } } else if(e->type() == EventManager::CtcpEventFlush && _replies.contains(e->uuid())) { CtcpReply reply = _replies.take(e->uuid()); - packedReply(net, reply.bufferName, reply.replies); + if(reply.replies.count()) + packedReply(net, reply.bufferName, reply.replies); } }