From 4bd0969583a3b52f4a91f6d4e1c61668605e481d Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 7 Mar 2021 10:43:47 +0100 Subject: [PATCH] spamfilter { } blocks caused some confusing whitespace in stats for the spamfilter. Only after a rehash it showed the me::name as the setter. From now on we just display -config- in the setter field, like we do for all the other TKLs as well (ELINE, ban xyz, etc). --- src/modules/tkl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/tkl.c b/src/modules/tkl.c index 58970947e..810954a7a 100644 --- a/src/modules/tkl.c +++ b/src/modules/tkl.c @@ -34,7 +34,7 @@ ModuleHeader MOD_HEADER /* Forward declarations */ int tkl_config_test_spamfilter(ConfigFile *, ConfigEntry *, int, int *); -int tkl_config_match_spamfilter(ConfigFile *, ConfigEntry *, int); +int tkl_config_run_spamfilter(ConfigFile *, ConfigEntry *, int); int tkl_config_test_ban(ConfigFile *, ConfigEntry *, int, int *); int tkl_config_run_ban(ConfigFile *, ConfigEntry *, int); int tkl_config_test_except(ConfigFile *, ConfigEntry *, int, int *); @@ -193,7 +193,7 @@ MOD_TEST() MOD_INIT() { MARK_AS_OFFICIAL_MODULE(modinfo); - HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, tkl_config_match_spamfilter); + HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, tkl_config_run_spamfilter); HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, tkl_config_run_ban); HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, tkl_config_run_except); HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, tkl_config_run_set); @@ -439,7 +439,7 @@ int tkl_config_test_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type, int *e } /** Process a spamfilter { } block in the configuration file */ -int tkl_config_match_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type) +int tkl_config_run_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type) { ConfigEntry *cep; ConfigEntry *cepp; @@ -493,7 +493,7 @@ int tkl_config_match_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type) target, action, m, - me.name, + "-config-", 0, TStime(), bantime,