Merge sf.net patch 1812367 'Disable auto-rejoin on kick'

This removes the rejoin from core (the channel gets disabled) and adds
a kickrejoin module.

Thanks to cycomate for the original patch


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@852 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-10-24 17:44:12 +00:00
parent 6258e629e2
commit 87d19870cd
2 changed files with 111 additions and 8 deletions

View File

@@ -576,15 +576,11 @@ void CIRCSock::ReadLine(const CString& sData) {
MODULECALL(OnKick(Nick.GetNickMask(), sKickedNick, *pChan, sMsg), m_pUser, NULL, );
}
if (GetNick().CaseCmp(sKickedNick) == 0) {
CString sKey;
if (GetNick().CaseCmp(sKickedNick) == 0 && pChan) {
pChan->SetIsOn(false);
if (pChan) {
sKey = pChan->GetKey();
pChan->SetIsOn(false);
}
PutIRC("JOIN " + sChan + " " + sKey);
// Don't try to rejoin!
pChan->Disable();
}
if ((pChan) && (pChan->IsDetached())) {