From f169a3cf7750f7172562016dcf24f25f8a1699cd Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 18 Mar 2022 07:26:53 +0100 Subject: [PATCH] Fix channel ops unable to -h someone, even though they could +h. Reported by Jaka in https://bugs.unrealircd.org/view.php?id=6077 and Valware and buayadarat in https://bugs.unrealircd.org/view.php?id=6078 This commit also makes the halfop rules for +h/-h match the ones in U5: Previously in 6.0.0 - 6.0.2 it was: * halfops can set +h on others * halfops cannot set -h on others * halfops can set -h on themselves Now in 6.0.3+ it matches 5.x behavior again: * halfops cannot set -h or +h on others * halfops can set -h on themselves --- src/modules/chanmodes/halfop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/chanmodes/halfop.c b/src/modules/chanmodes/halfop.c index 2e2a6baca..a7e6b6fe6 100644 --- a/src/modules/chanmodes/halfop.c +++ b/src/modules/chanmodes/halfop.c @@ -73,9 +73,9 @@ int cmode_halfop_is_ok(Client *client, Channel *channel, char mode, const char * /* User may always remove their own modes */ return EX_ALLOW; } - if ((what == MODE_ADD) && check_channel_access(client, channel, "hoaq")) + if (check_channel_access(client, channel, "oaq")) { - /* Permitted for +hoaq */ + /* Permitted for +oaq */ return EX_ALLOW; } if (type == EXCHK_ACCESS_ERR)