+2004-11-21 Michael Poole <mdpoole@troilus.org>
+
+ * 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 <mdpoole@troilus.org>
* ircd/m_create.c (ms_create): Complain if a user tries to CREATE
}
/* 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>.");
}
/* 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>.");