mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Unify CJoinTimer and CMiscTimer to CUserTimer
The CJoinTimer which fired every 20s made the user try to join channels if there were still some channels pending. The CMiscTimer checked every 30s if a irc or client socket is near its timeout and sent a "PING" if it was. The new CUserTimer now does both every 30s. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1623 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
9
User.cpp
9
User.cpp
@@ -48,10 +48,8 @@ CUser::CUser(const CString& sUserName) {
|
||||
m_bAppendTimestamp = false;
|
||||
m_bPrependTimestamp = true;
|
||||
m_bIRCConnectEnabled = true;
|
||||
m_pJoinTimer = new CJoinTimer(this);
|
||||
m_pMiscTimer = new CMiscTimer(this);
|
||||
CZNC::Get().GetManager().AddCron(m_pJoinTimer);
|
||||
CZNC::Get().GetManager().AddCron(m_pMiscTimer);
|
||||
m_pUserTimer = new CUserTimer(this);
|
||||
CZNC::Get().GetManager().AddCron(m_pUserTimer);
|
||||
m_sUserPath = CZNC::Get().GetUserPath() + "/" + sUserName;
|
||||
m_sDLPath = GetUserPath() + "/downloads";
|
||||
}
|
||||
@@ -76,8 +74,7 @@ CUser::~CUser() {
|
||||
while (!m_sDCCSocks.empty())
|
||||
CZNC::Get().GetManager().DelSockByAddr((CZNCSock*) *m_sDCCSocks.begin());
|
||||
|
||||
CZNC::Get().GetManager().DelCronByAddr(m_pJoinTimer);
|
||||
CZNC::Get().GetManager().DelCronByAddr(m_pMiscTimer);
|
||||
CZNC::Get().GetManager().DelCronByAddr(m_pUserTimer);
|
||||
}
|
||||
|
||||
#ifdef _MODULES
|
||||
|
||||
Reference in New Issue
Block a user