From 64f7f6da9cf8f3f79dd665880b4f9d25cc6e4ba1 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 26 Oct 2006 16:33:43 +0000 Subject: Fix this to display the channel name when overriding a ban, and to properly display +i overrides in the right way git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5541 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_override.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/modules/m_override.cpp') diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index ccc8191a6..edfffcca4 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -248,20 +248,18 @@ class ModuleOverride : public Module { if ((chan->modes[CM_INVITEONLY]) && (CanOverride(user,"INVITE"))) { - if (NoisyOverride) + irc::string x = chan->name; + if (!user->IsInvited(x)) { - irc::string x = chan->name; - if (!user->IsInvited(x)) - { - /* XXX - Ugly cast for a parameter that isn't used? :< - Om */ + /* XXX - Ugly cast for a parameter that isn't used? :< - Om */ + if (NoisyOverride) chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass invite-only", cname, user->nick); - } + ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname)); } - ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname)); return -1; } - if ((chan->key[0]) && (CanOverride(user,"KEY"))) + if ((*chan->key) && (CanOverride(user,"KEY"))) { if (NoisyOverride) chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel key", cname, user->nick); @@ -283,7 +281,7 @@ class ModuleOverride : public Module { if (NoisyOverride) 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", user->nick); + ServerInstance->SNO->WriteToSnoMask('O',"%s used oper-override to bypass channel ban on %s", user->nick, cname); } return -1; } -- cgit v1.2.3