diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-26 00:27:04 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-26 00:27:04 +0000 |
commit | 2f717cb4dc43864f585ebdfd4d33ae6aa8abdeb6 (patch) | |
tree | b18d621dd13c921777ae2124c2d2a5d3d1a89365 | |
parent | dcfd227ffbfb11833663c1f96490d41537b4f496 (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
-rw-r--r-- | src/modules/m_override.cpp | 21 |
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; } } |