mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 18:03:13 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
/* "<char1><char2>" followed by "<rest>" */
|
||||
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"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user