From abc0cf82c518c5f3d3b7aa18142e79359d1e079c Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 11 Jan 2009 08:47:27 +0000 Subject: [PATCH] Handle JOIN redirects due to +L Without this, ZNC would keep trying to join the channel which is full and which caused the redirect. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1327 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/IRCSock.cpp b/IRCSock.cpp index e122f5d4..face233b 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -156,6 +156,23 @@ void CIRCSock::ReadLine(const CString& sData) { case 376: // end motd m_pUser->AddMotdBuffer(":" + sServer + " " + sCmd + " ", " " + sRest); break; + case 470: { + // :irc.unreal.net 470 mynick [Link] #chan1 has become full, so you are automatically being transferred to the linked channel #chan2 + // :mccaffrey.freenode.net 470 mynick #electronics ##electronics :Forwarding to another channel + + // freenode style numeric + CChan* pChan = m_pUser->FindChan(sRest.Token(0)); + if (!pChan) { + // unreal style numeric + pChan = m_pUser->FindChan(sRest.Token(1)); + } + if (pChan) { + pChan->Disable(); + m_pUser->PutStatus("Channel [" + pChan->GetName() + "] is linked to " + "another channel and was thus disabled."); + } + break; + } case 437: // :irc.server.net 437 * badnick :Nick/channel is temporarily unavailable // :irc.server.net 437 mynick badnick :Nick/channel is temporarily unavailable