From b3e9ee509dcee7004162276147ace76795730167 Mon Sep 17 00:00:00 2001 From: special Date: Thu, 21 Dec 2006 00:40:15 +0000 Subject: This should fix the issue with unsetting +J git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6050 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_kicknorejoin.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 9bbb5f456..19cbc638f 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -61,14 +61,24 @@ class KickRejoin : public ModeHandler { // Taking the mode off, we need to clean up. delaylist* dl; - + if (channel->GetExt("norejoinusers", dl)) { DELETE(dl); channel->Shrink("norejoinusers"); } + + if (!channel->IsModeSet('J')) + { + return MODEACTION_DENY; + } + else + { + channel->SetMode('J', false); + return MODEACTION_ALLOW; + } } - if ((!adding) || (atoi(parameter.c_str()) > 0)) + else if (atoi(parameter.c_str()) > 0) { ServerInstance->Log(DEBUG,"Got parameter: '%s'",parameter.c_str()); @@ -81,12 +91,6 @@ class KickRejoin : public ModeHandler } else { - if (!adding) - { - channel->SetModeParam('J', parameter.c_str(), adding); - return MODEACTION_ALLOW; - } - std::string cur_param = channel->GetModeParameter('J'); if (cur_param == parameter) { -- cgit v1.2.3