From 1a1cc4c756e0b2b2a469d66da5515b7aa50a7628 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 21 Jul 2008 10:15:16 +0000 Subject: [PATCH] We are in a channel when we received the JOIN for it, not it's "end of /names" This moves some calls from the raw 366 handler to the JOIN handler and it might even fix a bug (well, which no one would ever have triggered). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1140 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index 4db85e1f..17fa0fc9 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -393,10 +393,7 @@ void CIRCSock::ReadLine(const CString& sData) { CChan* pChan = m_pUser->FindChan(sRest.Token(0)); if (pChan) { - if (!pChan->IsOn()) { - pChan->SetIsOn(true); - PutIRC("MODE " + pChan->GetName()); - + if (pChan->IsOn()) { // If we are the only one in the chan, set our default modes if (pChan->GetNickCount() == 1) { CString sModes = pChan->GetDefaultModes(); @@ -510,6 +507,9 @@ void CIRCSock::ReadLine(const CString& sData) { if (pChan) { pChan->ResetJoinTries(); pChan->Enable(); + pChan->SetIsOn(true); + PutIRC("MODE " + pChan->GetName()); + } } else { pChan = m_pUser->FindChan(sChan);