znc/znc — pull request #560 by ahf (2014-05-30 12:25:13+00:00)
Title: Start joining channels immediately after connect

We refactor the CUserTimer into CIRCNetworkPingTimer and CIRCNetworkJoinTimer and moves the two new timers into CIRCNetwork. The rationale for doing this is that the CUserTimer was doing much more than the name said: instead, we now have three timers taking care of each their own duties and we can easily stop and start them without interfering with the other timers.

We add a new constant to CIRCNetwork, PING_TIMEOUT, to avoid hardcoding the 270 value in CUser and CIRCNetwork. We also decrease the Join timer's interval from 30 to 10 seconds.

Lastly, we make the Q module join channels immediately after we are spoofed, if the JoinAfterCloaked setting is true.

This set of patches also contains a new Reset() API to CCron. This have been upstreamed to Csocket in jimloco/Csocket#22 - I am unsure if we should wait until upstream accepts it, but I will leave that up to the reviewer.

Feedback appreciated.