Only let services (not normal opers) force a change of +A or +u.
authorMichael Poole <mdpoole@troilus.org>
Sun, 12 Sep 2004 12:57:32 +0000 (12:57 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 12 Sep 2004 12:57:32 +0000 (12:57 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1136 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index d03fc41b63f3d5e5b3ceed886db7baa9105d80ca..3ba5b71ad0bccba24a68db1fd7e8714f6205e912 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-12  Michael Poole <mdpoole@troilus.org>
+
+       * include/channel.c (mode_parse_upass, mode_parse_apass): Only let
+       services (not normal opers) force a change of +A or +u.
+
 2004-09-11  Michael Poole <mdpoole@troilus.org>
 
        * include/s_stats.h: Add sd_name to struct StatDesc.  Stop
index 29b773488fcd0e07e72461b8242a490c67353b2f..90c0d62c6f93df39d962ab398634465599efa3dc 100644 (file)
@@ -2340,6 +2340,13 @@ mode_parse_upass(struct ParseState *state, int *flag_p)
     return;
   }
 
+  /* If a non-service user is trying to force it, refuse. */
+  if (state->flags & MODE_PARSE_FORCE && !IsChannelService(state->sptr)) {
+    send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
+               "Use /JOIN", state->chptr->chname, " <AdminPass>.");
+    return;
+  }
+
   /* If they are not the channel manager, they are not allowed to change it */
   if (MyUser(state->sptr) && !IsChannelManager(state->member)) {
     if (*state->chptr->mode.apass) {
@@ -2440,6 +2447,13 @@ mode_parse_apass(struct ParseState *state, int *flag_p)
     return;
   }
 
+  /* If a non-service user is trying to force it, refuse. */
+  if (state->flags & MODE_PARSE_FORCE && !IsChannelService(state->sptr)) {
+    send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
+               "Use /JOIN", state->chptr->chname, " <AdminPass>.");
+    return;
+  }
+
   /* Don't allow to change the Apass if the channel is older than 48 hours. */
   if (TStime() - state->chptr->creationtime >= 172800 && !IsAnOper(state->sptr)) {
     send_reply(state->sptr, ERR_CHANSECURED, state->chptr->chname);