int i;
for (i = 0; i <= HighestFd; i++)
{
- struct Client *acptr;
+ struct Client *acptr = 0;
if ((acptr = LocalClientArray[i]) && acptr->listing &&
acptr->listing->chptr == chptr)
{
if (MyUser(state->sptr) && state->max_args <= 0) /* drop if too many args */
return;
- if (state->parc <= 0) { /* warn if not enough args */
- if (MyUser(state->sptr))
- need_more_params(state->sptr, state->dir == MODE_ADD ?
- (flag_p[0] == MODE_CHANOP ? "MODE +o" : "MODE +v") :
- (flag_p[0] == MODE_CHANOP ? "MODE -o" : "MODE -v"));
+ if (state->parc <= 0) /* return if not enough args */
return;
- }
t_str = state->parv[state->args_used++]; /* grab arg */
state->parc--;
* exactly the same logic, albeit somewhat more concise, as was in
* the original m_part.c */
- if (jbuf->jb_type == JOINBUF_TYPE_PARTALL) /* got to remove user here */
+ if (jbuf->jb_type == JOINBUF_TYPE_PARTALL ||
+ IsLocalChannel(chan->chname)) /* got to remove user here */
remove_user_from_channel(jbuf->jb_source, chan);
} else {
/* Add user to channel */