From 04a45e8b8346fce1815dbb5bf56ac29b6ca40c6f Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Tue, 29 Dec 2020 12:44:54 +0100 Subject: [PATCH] Fix targetfloodprot module not exempting U-Lines (only matters if not +o). It is highly recommended that services pseudo users all have +o since there are likely many places where ULines don't bypass a restriction while opers do. But still, this particular issue has been fixed, it caused unexplained loss of messages which looked rather mysterious. Reported by severinmueller in https://bugs.unrealircd.org/view.php?id=5799 --- src/modules/targetfloodprot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/targetfloodprot.c b/src/modules/targetfloodprot.c index 3094013d5..be1e4d5b3 100644 --- a/src/modules/targetfloodprot.c +++ b/src/modules/targetfloodprot.c @@ -234,8 +234,8 @@ int targetfloodprot_can_send_to_channel(Client *client, Channel *channel, Member if (!MyUser(client)) return HOOK_CONTINUE; - /* Really, only IRCOps override */ - if (IsOper(client) && ValidatePermissionsForPath("immune:target-flood",client,NULL,channel,NULL)) + /* IRCOps and U-Lines override */ + if (IsULine(client) || (IsOper(client) && ValidatePermissionsForPath("immune:target-flood",client,NULL,channel,NULL))) return HOOK_CONTINUE; what = sendtypetowhat(sendtype); @@ -280,8 +280,8 @@ int targetfloodprot_can_send_to_user(Client *client, Client *target, char **text if (!MyUser(target)) return HOOK_CONTINUE; - /* Really, only IRCOps override */ - if (IsOper(client) && ValidatePermissionsForPath("immune:target-flood",client,target,NULL,NULL)) + /* IRCOps and U-Lines override */ + if (IsULine(client) || (IsOper(client) && ValidatePermissionsForPath("immune:target-flood",client,target,NULL,NULL))) return HOOK_CONTINUE; what = sendtypetowhat(sendtype);