summaryrefslogtreecommitdiff
path: root/src/modules/m_override.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r--src/modules/m_override.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 342e42829..7dd58d8c2 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -231,17 +231,12 @@ class ModuleOverride : public Module
if (CanOverride(user,"BANWALK"))
{
- for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
+ if (chan->IsBanned(user))
{
- char mask[MAXBUF];
- sprintf(mask,"%s!%s@%s",user->nick, user->ident, user->GetIPString());
- if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)))
+ if (NoisyOverride)
{
- if (NoisyOverride)
- {
- chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass channel bans on %s", cname, user->nick,i->data);
- ServerInstance->SNO->WriteToSnoMask('O',"%s used oper-override to bypass channel bans on %s", cname, user->nick, i->data);
- }
+ chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass channel ban", cname, user->nick);
+ ServerInstance->SNO->WriteToSnoMask('O',"%s used oper-override to bypass channel ban", cname, user->nick);
}
}
return -1;