diff --git a/Client.cpp b/Client.cpp index 13918e91..acef5e7e 100644 --- a/Client.cpp +++ b/Client.cpp @@ -180,7 +180,10 @@ void CClient::ReadLine(const CString& sData) { } else if (sCommand.Equals("PING")) { // All PONGs are generated by znc. We will still forward this to // the ircd, but all PONGs from irc will be blocked. - PutClient(":irc.znc.in PONG irc.znc.in " + sLine.substr(5)); + if (sLine.length() >= 5) + PutClient(":irc.znc.in PONG irc.znc.in " + sLine.substr(5)); + else + PutClient(":irc.znc.in PONG irc.znc.in"); } else if (sCommand.Equals("PONG")) { // Block PONGs, we already responded to the pings return;