Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2004-11-21 15:00:34 UTC
Modified files:
ChangeLog ircd/channel.c
Log message:
Allow OPMODE to change +A and +U passwords rather than crashing.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.510 ircu2.10/ChangeLog:1.511
--- ircu2.10/ChangeLog:1.510 Sat Nov 20 07:00:55 2004
+++ ircu2.10/ChangeLog Sun Nov 21 07:00:21 2004
@@ -1,3 +1,9 @@
+2004-11-21 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/channel.c (mode_parse_upass): Allow forced mode changes to
+ be done by non-channel-managers, fixing a crash from OPMODE.
+ (mode_parse_apass): Likewise.
+
2004-11-20 Michael Poole <[EMAIL PROTECTED]>
* ircd/m_create.c (ms_create): Complain if a user tries to CREATE
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.109 ircu2.10/ircd/channel.c:1.110
--- ircu2.10/ircd/channel.c:1.109 Sun Nov 7 11:29:13 2004
+++ ircu2.10/ircd/channel.c Sun Nov 21 07:00:23 2004
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintanance
- * @version $Id: channel.c,v 1.109 2004/11/07 19:29:13 entrope Exp $
+ * @version $Id: channel.c,v 1.110 2004/11/21 15:00:23 entrope Exp $
*/
#include "config.h"
@@ -2436,7 +2436,7 @@
}
/* If they are not the channel manager, they are not allowed to change it */
- if (MyUser(state->sptr) && !IsChannelManager(state->member)) {
+ if (MyUser(state->sptr) && !(state->flags & MODE_PARSE_FORCE ||
IsChannelManager(state->member))) {
if (*state->chptr->mode.apass) {
send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
"Use /JOIN", state->chptr->chname, "<AdminPass>.");
@@ -2549,7 +2549,7 @@
}
/* If they are not the channel manager, they are not allowed to change it */
- if (MyUser(state->sptr) && !IsChannelManager(state->member)) {
+ if (MyUser(state->sptr) && !(state->flags & MODE_PARSE_FORCE ||
IsChannelManager(state->member))) {
if (*state->chptr->mode.apass) {
send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
"Use /JOIN", state->chptr->chname, "<AdminPass>.");
----------------------- End of diff -----------------------