summaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/channels.c b/src/channels.c
index 7f4867c40..f1add79e3 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -326,10 +326,9 @@ void chan_set_user_status(Channel * chan, User * user, int16 status)
alog("debug: setting user status (%d) on %s for %s", status,
user->nick, chan->name);
- if (HelpChannel && ircd->supporthelper
- && (status == CUS_OP || status == (CUS_PROTECT | CUS_OP)
- || status == (CUS_OWNER | CUS_OP))
- && !stricmp(chan->name, HelpChannel)) {
+ if (HelpChannel && ircd->supporthelper && (status & CUS_OP)
+ && (stricmp(chan->name, HelpChannel) == 0)
+ && (!chan->ci || check_access(user, chan->ci, CA_AUTOOP))) {
if (debug) {
alog("debug: %s being given +h for having %d status in %s",
user->nick, status, chan->name);