Fixed AwayNick timer and added BackNick timer

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@553 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-10-09 21:47:57 +00:00
parent e80a9f2a81
commit b5a3cd3727
5 changed files with 67 additions and 17 deletions

View File

@@ -2,12 +2,10 @@
#include "IRCSock.h"
#include "DCCBounce.h"
#include "UserSock.h"
#include "Timers.h"
#include <time.h>
CIRCSock::CIRCSock(CUser* pUser) : Csock() {
m_pUser = pUser;
m_pAwayNickTimer = NULL;
m_bISpoofReleased = false;
m_bKeepNick = true;
m_bAuthed = false;
@@ -49,8 +47,6 @@ CIRCSock::~CIRCSock() {
PutServ("QUIT :" + m_pUser->GetQuitMsg());
m_msChans.clear();
CZNC::Get().GetManager().DelCronByAddr(m_pAwayNickTimer);
}
void CIRCSock::ReadLine(const CString& sData) {
@@ -87,10 +83,8 @@ void CIRCSock::ReadLine(const CString& sData) {
m_pUser->SetIRCServer(sServer);
SetTimeout(900); // Now that we are connected, let nature take its course
PutServ("WHO " + sNick);
if (!m_pAwayNickTimer) {
m_pAwayNickTimer = new CAwayNickTimer(m_pUser);
CZNC::Get().GetManager().AddCron(m_pAwayNickTimer);
}
m_pUser->StartAwayNickTimer();
VOIDMODULECALL(OnIRCConnected());