From 648a10494f3c8ac476155c936f106849e94a85b3 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 28 Feb 2026 15:26:57 +0100 Subject: [PATCH] Add -DTESTSUITE and use it from extras/build-tests/nix/build. In particular, this disables default +F for #__SYNC__ channels. The test suite has a "+F off" but when on 3 servers, each 75 clones are connecting, the MODE is too late and the join limit is already reached sometimes. Causing tests to fail. --- extras/build-tests/nix/build | 2 +- src/modules/chanmodes/floodprot.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extras/build-tests/nix/build b/extras/build-tests/nix/build index 3cced367e..14e2123f9 100755 --- a/extras/build-tests/nix/build +++ b/extras/build-tests/nix/build @@ -17,7 +17,7 @@ else fi # -DRAWCMDLOGGING was dropped, but can be useful for debugging -export CPPFLAGS="$CPPFLAGS -DFAKELAG_CONFIGURABLE -DNOREMOVETMP" +export CPPFLAGS="$CPPFLAGS -DFAKELAG_CONFIGURABLE -DNOREMOVETMP -DTESTSUITE" # !! skipped for now: extras/build-tests/nix/select-config $BUILDCONFIG !! # !! temporary use this: diff --git a/src/modules/chanmodes/floodprot.c b/src/modules/chanmodes/floodprot.c index 7c50f8e9b..2f962dc43 100644 --- a/src/modules/chanmodes/floodprot.c +++ b/src/modules/chanmodes/floodprot.c @@ -1205,6 +1205,12 @@ 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;