Respond to CTCP PING even if it had no parameter.
authorBas Pape <baspape@gmail.com>
Sat, 7 Sep 2013 11:09:06 +0000 (13:09 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 10 Oct 2013 18:15:13 +0000 (20:15 +0200)
Normally the response param is whatever came in, but e.g. qwebirc does
not send any params if the user does not explicitly specify any. This
would result in "Received unknown CTCP-PING". This patch makes quassel
respond with any empty string.

src/core/coresessioneventprocessor.cpp

index 80ea7d8..f8fd4d7 100644 (file)
@@ -1016,7 +1016,7 @@ void CoreSessionEventProcessor::handleCtcpClientinfo(CtcpEvent *e)
 
 void CoreSessionEventProcessor::handleCtcpPing(CtcpEvent *e)
 {
 
 void CoreSessionEventProcessor::handleCtcpPing(CtcpEvent *e)
 {
-    e->setReply(e->param());
+    e->setReply(e->param().isNull() ? "" : e->param());
 }
 
 
 }