CIRCNetwork: add support for join delay (resolves #586)

This commit is contained in:
J-P Nurmi
2014-10-10 21:51:56 +02:00
parent e9ab3e2bcf
commit 78a0331daa
3 changed files with 33 additions and 6 deletions
+7
View File
@@ -45,6 +45,7 @@ public:
~CIRCNetwork();
enum {
JOIN_FREQUENCY = 30,
/** How long must an IRC connection be idle before ZNC sends a ping */
PING_FREQUENCY = 270,
/** Time between checks if PINGs need to be sent */
@@ -136,6 +137,7 @@ public:
*/
bool IsIRCConnected() const;
void SetIRCSocket(CIRCSock* pIRCSock);
void IRCConnected();
void IRCDisconnected();
void CheckIRCConnect();
@@ -178,6 +180,9 @@ public:
void SetFloodRate(double fFloodRate) { m_fFloodRate = fFloodRate; }
void SetFloodBurst(unsigned short int uFloodBurst) { m_uFloodBurst = uFloodBurst; }
unsigned short int GetJoinDelay() const { return m_uJoinDelay; }
void SetJoinDelay(unsigned short int uJoinDelay) { m_uJoinDelay = uJoinDelay; }
CString ExpandString(const CString& sStr) const;
CString& ExpandString(const CString& sStr, CString& sRet) const;
private:
@@ -223,6 +228,8 @@ protected:
CIRCNetworkPingTimer* m_pPingTimer;
CIRCNetworkJoinTimer* m_pJoinTimer;
unsigned short int m_uJoinDelay;
};
#endif // !_IRCNETWORK_H