From: Michael Poole Date: Sun, 21 Nov 2004 15:00:23 +0000 (+0000) Subject: Allow OPMODE to change +A and +U passwords rather than crashing. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=90bc06ef416b1fb780b84301f51145a1ae318449 Allow OPMODE to change +A and +U passwords rather than crashing. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1270 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 09eae74..1b391a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-21 Michael Poole + + * 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 * ircd/m_create.c (ms_create): Complain if a user tries to CREATE diff --git a/ircd/channel.c b/ircd/channel.c index 9ff1bcf..90eed24 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -2436,7 +2436,7 @@ mode_parse_upass(struct ParseState *state, int *flag_p) } /* 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, "."); @@ -2549,7 +2549,7 @@ mode_parse_apass(struct ParseState *state, int *flag_p) } /* 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, ".");