From 676d105347ef44d20f3a5cdb844dc3dcf8448439 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 17 Nov 2016 23:45:25 +0000 Subject: [PATCH 1/2] Workaround gitter for 1.6 It's fixed properly for 1.7 already. Fix #1321 --- src/IRCSock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp index 91730f16..500f8df6 100644 --- a/src/IRCSock.cpp +++ b/src/IRCSock.cpp @@ -145,7 +145,7 @@ void CIRCSock::ReadLine(const CString& sData) { // we don't want any PING forwarded PutIRCQuick("PONG " + sLine.substr(5)); return; - } else if (sLine.Token(1).Equals("PONG")) { + } else if ((sLine.Token(1).Equals("PONG") && sLine.Token(0).StartsWith(":")) || sLine.Token(0).Equals("PONG")) { // Block PONGs, we already responded to the pings return; } else if (sLine.Equals("ERROR ", false, 6)) { From 0ac3cfc8d5a3ac14fe68758d5d6360280dcc9707 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 19 Nov 2016 23:35:12 +0000 Subject: [PATCH 2/2] Fix regression of 1.6.0 Cloning a user caused a non-immediate segfault. This was fixed already in 1.7 branch (by refactoring). Fix #1340 --- src/IRCNetwork.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/IRCNetwork.cpp b/src/IRCNetwork.cpp index 7f6da53f..4513e674 100644 --- a/src/IRCNetwork.cpp +++ b/src/IRCNetwork.cpp @@ -157,6 +157,12 @@ CIRCNetwork::CIRCNetwork(CUser *pUser, const CIRCNetwork &Network) { m_MotdBuffer.SetLineCount(200, true); // This should be more than enough motd lines m_NoticeBuffer.SetLineCount(250, true); + m_pPingTimer = new CIRCNetworkPingTimer(this); + CZNC::Get().GetManager().AddCron(m_pPingTimer); + + m_pJoinTimer = new CIRCNetworkJoinTimer(this); + CZNC::Get().GetManager().AddCron(m_pJoinTimer); + Clone(Network); }