chm_simple(): enforce MLOCK

This commit is contained in:
William Pitcock 2010-03-07 23:15:52 -06:00
parent 8727cbe88a
commit f02f338b31

View file

@ -505,7 +505,7 @@ chm_simple(struct Client *source_p, struct Channel *chptr,
return;
/* setting + */
if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type))
if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type) && !(chptr->mode_lock.off_mode & mode_type))
{
/* if +f is disabled, ignore an attempt to set +QF locally */
if(!ConfigChannel.use_forward && MyClient(source_p) &&
@ -522,7 +522,7 @@ chm_simple(struct Client *source_p, struct Channel *chptr,
mode_changes[mode_count].mems = ALL_MEMBERS;
mode_changes[mode_count++].arg = NULL;
}
else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type) && !(chptr->mode_lock.mode & mode_type))
{
chptr->mode.mode &= ~mode_type;