diff --git a/src/modules/chanmodes/operonly.c b/src/modules/chanmodes/operonly.c index 286a3e0ef..1c0fb672c 100644 --- a/src/modules/chanmodes/operonly.c +++ b/src/modules/chanmodes/operonly.c @@ -100,9 +100,10 @@ DLLFUNC int operonly_require_oper(aClient *cptr, aChannel *chptr, char mode, cha if (!MyClient(cptr) || ValidatePermissionsForPath("channel:operonly",cptr,NULL,chptr,NULL)) return EX_ALLOW; + if (checkt == EXCHK_ACCESS_ERR) + sendto_one(cptr, err_str(ERR_CANNOTCHANGECHANMODE), + me.name, cptr->name, 'O', "You are not an IRC operator"); - sendto_one(cptr, err_str(ERR_CANNOTCHANGECHANMODE), - me.name, cptr->name, 'O', "You are not an IRC operator"); return EX_DENY; } diff --git a/src/modules/chanmodes/permanent.c b/src/modules/chanmodes/permanent.c index 5cb45126a..3e9d3e9a5 100644 --- a/src/modules/chanmodes/permanent.c +++ b/src/modules/chanmodes/permanent.c @@ -42,7 +42,9 @@ static int permanent_is_ok(aClient *cptr, aChannel *chptr, char mode, char *para { if (!IsOper(cptr)) { - sendto_one(cptr, err_str(ERR_NOPRIVILEGES), me.name, cptr->name); + if (checkt == EXCHK_ACCESS_ERR) + sendto_one(cptr, err_str(ERR_NOPRIVILEGES), me.name, cptr->name); + return EX_DENY; }