From dbc31824628a87eb3fc383dd2aa80352e5a7cea8 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 8 Apr 2026 17:50:16 +0200 Subject: [PATCH] Update -DTESTSUITE +f/+F exemption. The "not setting +F" stuff didn't work, as due to netmerge - which can even happen without a split when joining clients on both sides - this would revert to +F normal basically. So we just explicitly exempt in the join and msg code. All this is for unrealircd-tests. --- src/modules/chanmodes/floodprot.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/modules/chanmodes/floodprot.c b/src/modules/chanmodes/floodprot.c index d776f18be..2fbadea06 100644 --- a/src/modules/chanmodes/floodprot.c +++ b/src/modules/chanmodes/floodprot.c @@ -1215,12 +1215,6 @@ int cmodef_channel_create(Channel *channel) ChannelFloodProtection *base; ChannelFloodProtection *fld; -#ifdef TESTSUITE - /* Sync channels for the test suite are exempt */ - if (!strncasecmp(channel->name, "#__SYNC__", 9)) - return 0; -#endif - if (!cfg.default_profile) return 0; @@ -1371,6 +1365,11 @@ int floodprot_can_send_to_channel(Client *client, Channel *channel, Membership * if (ValidatePermissionsForPath("channel:override:flood",client,NULL,channel,NULL) || !IsFloodLimit(channel) || check_channel_access(client, channel, "hoaq")) return HOOK_CONTINUE; +#ifdef TESTSUITE + if (!strncasecmp(channel->name, "#__SYNC__", 9)) + return HOOK_CONTINUE; +#endif + if (!(mb = find_membership_link(client->user->channel, channel))) return HOOK_CONTINUE; /* not in channel */ @@ -1498,6 +1497,11 @@ int floodprot_post_chanmsg(Client *client, Channel *channel, int sendflags, cons if (!IsFloodLimit(channel) || check_channel_access(client, channel, "hoaq") || IsULine(client)) return 0; +#ifdef TESTSUITE + if (!strncasecmp(channel->name, "#__SYNC__", 9)) + return 0; +#endif + if (sendtype == SEND_TYPE_TAGMSG) return 0; // TODO: some TAGMSG specific limit? (2 of 2)