1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 17:33:13 +02:00

Don't crash when reading spamfilters from tkldb that don't compile (anymore).

For example, because of a different version of PCRE2, or because of the switch
from non-UTF8 to UTF8 (or vice versa) which disallows certain byte sequences.
This commit is contained in:
Bram Matthys
2023-10-05 17:37:06 +02:00
parent 1d34753f18
commit 8398c8cd8d
+2 -1
View File
@@ -713,7 +713,8 @@ int read_tkldb(void)
R_SAFE(unrealdb_read_int64(db, &v));
tkl->ptr.spamfilter->tkl_duration = v;
if (find_tkl_spamfilter(tkl->type, tkl->ptr.spamfilter->match->str,
if (!do_not_add &&
find_tkl_spamfilter(tkl->type, tkl->ptr.spamfilter->match->str,
tkl->ptr.spamfilter->action->action,
tkl->ptr.spamfilter->target))
{