From 2f717cb4dc43864f585ebdfd4d33ae6aa8abdeb6 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 26 Oct 2008 00:27:04 +0000 Subject: fix for banwalk and keys reported by mix941 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10719 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_override.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/modules/m_override.cpp') 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; } } -- cgit v1.2.3