diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:48:36 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:48:36 +0000 |
commit | 090107db5f2afa16e155f56d7928e38d0a17a295 (patch) | |
tree | 396c2d0fd726a40aecd3d866f1a8cfdc0bc54732 /src/core/cs_drop.c | |
parent | f2fb7ef53f1082f5c194f56f80592111051f1f76 (diff) |
Add access checking to cs_* modules. Also change number of arguments for cs_modes commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2134 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_drop.c')
-rw-r--r-- | src/core/cs_drop.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c index d5ca0bcd0..cf30df8dc 100644 --- a/src/core/cs_drop.c +++ b/src/core/cs_drop.c @@ -38,7 +38,6 @@ class CommandCSDrop : public Command { const char *chan = params[0].c_str(); ChannelInfo *ci; - int is_servadmin = is_services_admin(u); if (readonly) { @@ -52,19 +51,19 @@ class CommandCSDrop : public Command return MOD_CONT; } - if (!is_servadmin && (ci->flags & CI_FORBIDDEN)) + if ((ci->flags & CI_FORBIDDEN) && !u->nc->HasCommand("chanserv/drop")) { notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN, chan); return MOD_CONT; } - if (!is_servadmin && (ci->flags & CI_SUSPENDED)) + if ((ci->flags & CI_SUSPENDED) && !u->nc->HasCommand("chanserv/drop")) { notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN, chan); return MOD_CONT; } - if (!is_servadmin && (ci->flags & CI_SECUREFOUNDER ? !is_real_founder(u, ci) : !is_founder(u, ci))) + if ((ci->flags & CI_SECUREFOUNDER ? !is_real_founder(u, ci) : !is_founder(u, ci)) && !u->nc->HasCommand("chanserv/drop")) { notice_lang(s_ChanServ, u, ACCESS_DENIED); return MOD_CONT; @@ -95,7 +94,7 @@ class CommandCSDrop : public Command /* We must make sure that the Services admin has not normally the right to * drop the channel before issuing the wallops. */ - if (WallDrop && is_servadmin && level < ACCESS_FOUNDER) + if (WallDrop && level < ACCESS_FOUNDER) ircdproto->SendGlobops(s_ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick, chan); notice_lang(s_ChanServ, u, CHAN_DROPPED, chan); |