From 8965b351044fdbcc9f4b20bc1d9b11c3ccaa59c8 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 17 May 2010 13:31:17 +0000 Subject: [PATCH] autoop: Don't abort ongoing exchange on new joins When one joined to a channel after someone else's autoop already sent a challenge, the other autoop will forget it sent a challange and happily generate a new one. This might cause bogous "incorrect password" messages. Patch by DarthGandalf, bug found by SilverLeo (I think...). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1998 726aef4b-f618-498e-8847-2d620e286838 --- modules/autoop.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/autoop.cpp b/modules/autoop.cpp index 9d828b7e..784ce074 100644 --- a/modules/autoop.cpp +++ b/modules/autoop.cpp @@ -167,7 +167,10 @@ public: PutIRC("MODE " + Channel.GetName() + " +o " + Nick.GetNick()); } else { // then insert this nick into the queue, the timer does the rest - m_msQueue[Nick.GetNick().AsLower()] = ""; + CString sNick = Nick.GetNick().AsLower(); + if (m_msQueue.find(sNick) == m_msQueue.end()) { + m_msQueue[sNick] = ""; + } } break;