summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-07-17 17:33:35 -0400
committerAdam <Adam@anope.org>2010-07-17 17:33:35 -0400
commita9fa7edf82dbcea696654bf1c91cf634e5505ee7 (patch)
tree75d4f681709d2c1d48ccc5766377f201eac4505b
parent42dd49233c2c50506554c15fbb3fb2f730d9439f (diff)
Allow clearing of access lists while in XOP
-rw-r--r--src/core/cs_access.c7
-rw-r--r--version.log3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/cs_access.c b/src/core/cs_access.c
index 0a12d3f3c..b1616a5ca 100644
--- a/src/core/cs_access.c
+++ b/src/core/cs_access.c
@@ -154,21 +154,22 @@ int do_access(User * u)
int i;
int level = 0, ulev;
+ int is_clear = (cmd && stricmp(cmd, "CLEAR") == 0);
int is_list = (cmd && stricmp(cmd, "LIST") == 0);
int is_servadmin = is_services_admin(u);
/* If LIST, we don't *require* any parameters, but we can take any.
* If DEL, we require a nick and no level.
* Else (ADD), we require a level (which implies a nick). */
- if (!cmd || ((is_list || !stricmp(cmd, "CLEAR")) ? 0 :
+ if (!cmd || ((is_list || is_clear) ? 0 :
(stricmp(cmd, "DEL") == 0) ? (!nick || s) : !s)) {
syntax_error(s_ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
} else if (!(ci = cs_findchan(chan))) {
notice_lang(s_ChanServ, u, CHAN_X_NOT_REGISTERED, chan);
} else if (ci->flags & CI_VERBOTEN) {
notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN, chan);
- /* We still allow LIST in xOP mode, but not others */
- } else if ((ci->flags & CI_XOP) && !is_list) {
+ /* We still allow LIST and CLEAR in xOP mode, but not others */
+ } else if ((ci->flags & CI_XOP) && !is_list && !is_clear) {
if (ircd->halfop)
notice_lang(s_ChanServ, u, CHAN_ACCESS_XOP_HOP, s_ChanServ);
else
diff --git a/version.log b/version.log
index afca53d63..c9db416f3 100644
--- a/version.log
+++ b/version.log
@@ -8,9 +8,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="4"
VERSION_EXTRA="-git"
-VERSION_BUILD="3014"
+VERSION_BUILD="3015"
# $Log$ # Changes since the 1.8.4 Release
+#Revision 3015 - Allow clearing of access lists while in XOP mode
#Revision 3014 - Increased command buffer size. Insp 2.0 has a bigger appetite it seems..
#Revision 3012 - Removed enc_encrypt_in_place, it is unnecessary and it can easially be used improperly
#Revision 3010 - Encrypt very long passwords properly on /ns and /cs register