summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-26 00:27:04 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-26 00:27:04 +0000
commit2f717cb4dc43864f585ebdfd4d33ae6aa8abdeb6 (patch)
treeb18d621dd13c921777ae2124c2d2a5d3d1a89365 /src
parentdcfd227ffbfb11833663c1f96490d41537b4f496 (diff)
fix for banwalk and keys reported by mix941
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10719 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_override.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 8c3ea1bda..647660ae3 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -294,21 +294,18 @@ class ModuleOverride : public Module
return -1;
}
- if (CanOverride(user,"BANWALK"))
+ if (chan->IsBanned(user) && CanOverride(user,"BANWALK"))
{
- if (chan->IsBanned(user))
+ if (RequireKey && keygiven != "override")
{
- if (RequireKey && keygiven != "override")
- {
- // Can't join normally -- must use a special key to bypass restrictions
- user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
- return 1;
- }
-
- if (NoisyOverride)
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
- ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname);
+ // Can't join normally -- must use a special key to bypass restrictions
+ user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick.c_str());
+ return 1;
}
+
+ if (NoisyOverride)
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
+ ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname);
return -1;
}
}