From 42214ebdf3cd09fbfb07f40be763b427b8e381f6 Mon Sep 17 00:00:00 2001 From: dboyz Date: Wed, 22 Apr 2015 07:44:53 +0800 Subject: [PATCH] Add missing permission error message as reported in rabbitircd This is the exact commit I made to rabbitircd two years ago. Since the permission error is still missing, why not port it back to unrealircd. :) --- src/modules/chanmodes/permanent.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/chanmodes/permanent.c b/src/modules/chanmodes/permanent.c index 2ca3a4b74..59708d5a0 100644 --- a/src/modules/chanmodes/permanent.c +++ b/src/modules/chanmodes/permanent.c @@ -44,10 +44,13 @@ static void permanent_channel_destroy(aChannel *chptr, bool *should_destroy) static int permanent_is_ok(aClient *cptr, aChannel *chptr, char mode, char *para, int checkt, int what) { - if (IsOper(cptr)) - return EX_ALLOW; + if (!IsOper(cptr)) + { + sendto_one(cptr, err_str(ERR_NOPRIVILEGES), me.name, cptr->name); + return EX_DENY; + } - return EX_DENY; + return EX_ALLOW; } /* This is called on module init, before Server Ready */