From: Johannes Huber Date: Wed, 11 Aug 2010 01:19:38 +0000 (+0200) Subject: improved ctcp handler method, fixes #1011 X-Git-Tag: 0.6.2~7 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=bb51c809ad956b869181fd2475a62fd5404ba326 improved ctcp handler method, fixes #1011 do not add space in ctcp handler method pack if message is empty --- diff --git a/src/core/ctcphandler.cpp b/src/core/ctcphandler.cpp index 158c39d0..655f1700 100644 --- a/src/core/ctcphandler.cpp +++ b/src/core/ctcphandler.cpp @@ -162,6 +162,9 @@ void CtcpHandler::parse(Message::Type messageType, const QString &prefix, const } QByteArray CtcpHandler::pack(const QByteArray &ctcpTag, const QByteArray &message) { + if(message.isEmpty()) + return XDELIM + ctcpTag + XDELIM; + return XDELIM + ctcpTag + ' ' + xdelimQuote(message) + XDELIM; }