diff --git a/IRCSock.cpp b/IRCSock.cpp index 89b23d84..5fcb99c6 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -106,6 +106,13 @@ void CIRCSock::ReadLine(const CString& sData) { switch (uRaw) { case 1: {// :irc.server.com 001 nick :Welcome to the Internet Relay Network nick + if (m_bAuthed && sServer == "irc.znc.in") { + // m_bAuthed == true => we already received another 001 => we might be in a traffic loop + m_pUser->PutStatus("ZNC seems to be connected to itself, disconnecting..."); + Quit(); + return; + } + m_pUser->SetIRCServer(sServer); SetTimeout(240, TMO_READ); // Now that we are connected, let nature take its course PutIRC("WHO " + sNick);