improved ctcp handler method, fixes #1011
[quassel.git] / src / core / ctcphandler.cpp
index 158c39d..655f170 100644 (file)
@@ -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;
 }