mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
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
This commit is contained in:
+4
-4
@@ -393,10 +393,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
|||||||
CChan* pChan = m_pUser->FindChan(sRest.Token(0));
|
CChan* pChan = m_pUser->FindChan(sRest.Token(0));
|
||||||
|
|
||||||
if (pChan) {
|
if (pChan) {
|
||||||
if (!pChan->IsOn()) {
|
if (pChan->IsOn()) {
|
||||||
pChan->SetIsOn(true);
|
|
||||||
PutIRC("MODE " + pChan->GetName());
|
|
||||||
|
|
||||||
// If we are the only one in the chan, set our default modes
|
// If we are the only one in the chan, set our default modes
|
||||||
if (pChan->GetNickCount() == 1) {
|
if (pChan->GetNickCount() == 1) {
|
||||||
CString sModes = pChan->GetDefaultModes();
|
CString sModes = pChan->GetDefaultModes();
|
||||||
@@ -510,6 +507,9 @@ void CIRCSock::ReadLine(const CString& sData) {
|
|||||||
if (pChan) {
|
if (pChan) {
|
||||||
pChan->ResetJoinTries();
|
pChan->ResetJoinTries();
|
||||||
pChan->Enable();
|
pChan->Enable();
|
||||||
|
pChan->SetIsOn(true);
|
||||||
|
PutIRC("MODE " + pChan->GetName());
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pChan = m_pUser->FindChan(sChan);
|
pChan = m_pUser->FindChan(sChan);
|
||||||
|
|||||||
Reference in New Issue
Block a user