diff --git a/src/conf.c b/src/conf.c index cfd6ac2cd..3afb3d8c8 100644 --- a/src/conf.c +++ b/src/conf.c @@ -6419,13 +6419,22 @@ int _test_allow_channel(ConfigFile *conf, ConfigEntry *ce) for (cep = ce->items; cep; cep = cep->next) { - if (config_is_blankorempty(cep, "allow channel")) + if (!strcmp(cep->name, "match")) + { + has_match = 1; + test_match_block(conf, cep, &errors); + } + else if (!strcmp(cep->name, "mask")) + { + has_mask = 1; + test_match_block(conf, cep, &errors); + } + else if (config_is_blankorempty(cep, "allow channel")) { errors++; continue; } - - if (!strcmp(cep->name, "channel")) + else if (!strcmp(cep->name, "channel")) { has_channel = 1; } @@ -6440,16 +6449,6 @@ int _test_allow_channel(ConfigFile *conf, ConfigEntry *ce) } has_class = 1; } - else if (!strcmp(cep->name, "match")) - { - has_match = 1; - test_match_block(conf, cep, &errors); - } - else if (!strcmp(cep->name, "mask")) - { - has_mask = 1; - test_match_block(conf, cep, &errors); - } else { config_error_unknown(cep->file->filename, cep->line_number, diff --git a/src/modules/tkl.c b/src/modules/tkl.c index d268cf008..d03e76af0 100644 --- a/src/modules/tkl.c +++ b/src/modules/tkl.c @@ -413,6 +413,10 @@ int tkl_config_test_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type, int *e has_action = 1; errors += test_ban_action_config(cep); } + else if (!strcmp(cep->name, "except")) + { + test_match_block(cf, cep, &errors); + } else if (!cep->value) { config_error_empty(cep->file->filename, cep->line_number, @@ -517,10 +521,6 @@ int tkl_config_test_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type, int *e errors++; } } - else if (!strcmp(cep->name, "except")) - { - test_match_block(cf, cep, &errors); - } else { config_error_unknown(cep->file->filename, cep->line_number,