Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-07-15 03:15:39 UTC
Modified files:
ChangeLog ircd/channel.c
Log message:
Update oplevels appropriately on +A/-A.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.663 ircu2.10/ChangeLog:1.664
--- ircu2.10/ChangeLog:1.663 Thu Jul 14 20:02:29 2005
+++ ircu2.10/ChangeLog Thu Jul 14 20:15:10 2005
@@ -1,5 +1,10 @@
2005-07-14 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/channel.c (mode_parse_apass): Update oplevels when setting
+ or removing the +A password. Partial credit goes to Reed Loden.
+
+2005-07-14 Michael Poole <[EMAIL PROTECTED]>
+
* include/ircd_features.h: Declare new "his" pseudo-server to hold
FEAT_HIS_SERVERNAME and FEAT_HIS_SERVERINFO in a convenient place.
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.136 ircu2.10/ircd/channel.c:1.137
--- ircu2.10/ircd/channel.c:1.136 Thu Jul 14 20:02:48 2005
+++ ircu2.10/ircd/channel.c Thu Jul 14 20:15:27 2005
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.136 2005/07/15 03:02:48 entrope Exp $
+ * @version $Id: channel.c,v 1.137 2005/07/15 03:15:27 entrope Exp $
*/
#include "config.h"
@@ -2537,6 +2537,7 @@
static void
mode_parse_apass(struct ParseState *state, int *flag_p)
{
+ struct Membership *memb;
char *t_str, *s;
int t_len;
@@ -2645,10 +2646,18 @@
send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname,
state->chptr->mode.apass);
}
+ /* Give the channel manager level 0 ops. */
+ if (!(state->flags & MODE_PARSE_FORCE) &&
IsChannelManager(state->member))
+ SetOpLevel(state->member, 0);
} else { /* remove the old apass */
*state->chptr->mode.apass = '\0';
if (MyUser(state->sptr))
send_reply(state->sptr, RPL_APASSWARN_CLEAR);
+ /* Revert everyone to MAXOPLEVEL. */
+ for (memb = state->chptr->members; memb; memb = memb->next_member) {
+ if (memb->status & MODE_CHANOP)
+ memb->oplevel = MAXOPLEVEL;
+ }
}
}
}
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches