diff --git a/src/chmode.c b/src/chmode.c index 68edd05bd..d4e284c47 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -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;