From 9e4d32bf1a0a942c28b30901e7da196ab3ebfad5 Mon Sep 17 00:00:00 2001 From: Johannes Huber Date: Wed, 11 Aug 2010 03:19:38 +0200 Subject: [PATCH] improved ctcp handler method, fixes #1011 do not add space in ctcp handler method pack if message is empty --- src/core/ctcphandler.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.20.1