summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-21 00:40:15 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-21 00:40:15 +0000
commitb3e9ee509dcee7004162276147ace76795730167 (patch)
treeed0591d8d2964f0aaeece799a9dd9442e359bd86 /src/modules
parent3705f90b1abb723d716926eedf8e1ff80afae789 (diff)
This should fix the issue with unsetting +J
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6050 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_kicknorejoin.cpp20
1 files changed, 12 insertions, 8 deletions
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)
{