diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-26 16:33:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-26 16:33:43 +0000 |
commit | 64f7f6da9cf8f3f79dd665880b4f9d25cc6e4ba1 (patch) | |
tree | 18bdfa77eb886267f4b5495530bfd9c7db28bbfa /src/modules/m_override.cpp | |
parent | 9453f2ef368d298b329bec9a0d7cf94ff755d9eb (diff) |
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
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r-- | src/modules/m_override.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
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; } |