From c2e3c8c8b1e71bfc54699b53834cd192dec15cca Mon Sep 17 00:00:00 2001 From: GottemHams Date: Mon, 30 Dec 2019 12:21:15 +0100 Subject: [PATCH] Fix antirandom incorrectly defining its own BAN_ACT_WARN -- which is different from the one defined in include/struct.h and used in banact_stringtoval() -- resulting in kills instead of warns --- src/modules/antirandom.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/modules/antirandom.c b/src/modules/antirandom.c index f613f3e9d..176351c59 100644 --- a/src/modules/antirandom.c +++ b/src/modules/antirandom.c @@ -46,10 +46,6 @@ ModuleHeader MOD_HEADER #define MAX(x,y) ((x) > (y) ? (x) : (y)) #endif -#ifndef BAN_ACT_WARN - #define BAN_ACT_WARN 11 -#endif - /* "" followed by "" */ static char *triples_txt[] = { "aj", "fqtvxz", @@ -629,7 +625,7 @@ int antirandom_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs) } else if (!strcmp(cep->ce_varname, "ban-action")) { - if (!banact_stringtoval(cep->ce_vardata) && strcmp(cep->ce_vardata, "warn")) + if (!banact_stringtoval(cep->ce_vardata)) { config_error("%s:%i: set::antirandom::ban-action: unknown action '%s'", cep->ce_fileptr->cf_filename, cep->ce_varlinenum, cep->ce_vardata); @@ -693,8 +689,6 @@ int antirandom_config_run(ConfigFile *cf, ConfigEntry *ce, int type) if (!strcmp(cep->ce_varname, "ban-action")) { cfg.ban_action = banact_stringtoval(cep->ce_vardata); - if (!cfg.ban_action && strcmp(cep->ce_vardata, "warn")) - cfg.ban_action = BAN_ACT_WARN; } else if (!strcmp(cep->ce_varname, "ban-reason")) {