core: Silence auto-PINGs with invalid timestamps
authorShane Synan <digitalcircuit36939@gmail.com>
Mon, 18 Jun 2018 20:47:10 +0000 (15:47 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 18 Jun 2018 22:54:10 +0000 (00:54 +0200)
commitdcc541413235e39cc505061950d4aafa89367f98
treecaea0c9451aafdf3ee44ff9f6871cc9982775009
parent425364f5f68a37582ddfa0494f4305f98f761e23
core: Silence auto-PINGs with invalid timestamps

Track whether or not an automated ping reply is pending.  If so, and
if the network has not shown to reply to PING via quoting, silence
the response.

This fixes automated PING resulting in unsolicited PONG replies
spamming the server buffer for networks that don't quote PING in
PONG replies.  Manual PING still works in almost all cases, unless
the IRC server responds out-of-order.

Mark a network as sending valid PONG timestamps after the first one
is received, resetting on every connect (as each server may differ).

Simplify PONG silencing by using the EventManager::Silent flag,
remove redundant logic from EventStringifier.

Clean up private variable initialization.
src/core/corenetwork.cpp
src/core/corenetwork.h
src/core/coresessioneventprocessor.cpp
src/core/eventstringifier.cpp