1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:34:46 +02:00

Similarly to previous, fix allow channel::except and spamfilter::except

so they actually work.
This commit is contained in:
Bram Matthys
2026-06-05 10:36:46 +02:00
parent 425a9b978a
commit cbc9213d5e
2 changed files with 16 additions and 17 deletions
+12 -13
View File
@@ -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,
+4 -4
View File
@@ -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,