Rethink PING/PONG handling

All PINGs are replied by ZNC, only PINGs from the client are forwarded.
All PONGs are blocked.

This should solve all issues with annoying PONGs showing up in clients.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2043 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-06-25 15:51:16 +00:00
parent ced990fb87
commit bc40713b61
2 changed files with 9 additions and 13 deletions
+4 -3
View File
@@ -79,11 +79,12 @@ void CIRCSock::ReadLine(const CString& sData) {
MODULECALL(OnRaw(sLine), m_pUser, NULL, return);
if (sLine.Equals("PING ", false, 5)) {
// Generate a reply and don't forward this to any user,
// we don't want any PING forwarded
PutIRC("PONG " + sLine.substr(5));
m_pUser->PutUser(sLine);
return;
} else if (sLine.Token(1).Equals("PONG") && sLine.Token(3).Equals(":ZNC")) {
// We asked for this so don't forward the reply to clients.
} else if (sLine.Token(1).Equals("PONG")) {
// Block PONGs, we already responded to the pings
return;
} else if (sLine.Equals("ERROR ", false, 6)) {
//ERROR :Closing Link: nick[24.24.24.24] (Excess Flood)