From 45002eeb6ff459c4e8a859b5e895a5fe10d4dac4 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 6 Oct 2023 07:36:26 +0200 Subject: [PATCH] Fix STATS output for config-based spamfilters with reasons with spaces. For config-based spamfilters, the reason was not escaped, meaning that spaces and underscores did not work as expected. For example, in "STATS spamfilter" the spaces were displayed as-is which means that the numeric output was not really parsable. Apparently this bug exists since UnrealIRCd 5 already... --- src/modules/tkl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/tkl.c b/src/modules/tkl.c index c6c094374..d21df5811 100644 --- a/src/modules/tkl.c +++ b/src/modules/tkl.c @@ -638,6 +638,7 @@ int tkl_config_run_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type) if (match) m = unreal_create_match(match_type, match, NULL); + banreason = unreal_encodespace(banreason); tkl_add_spamfilter(TKL_SPAMF, id, target,