1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 21:13:12 +02:00

Fix possible crash on SETNAME with spamfilter 'u'.

[skip ci]
This commit is contained in:
Bram Matthys
2023-10-06 07:12:15 +02:00
parent 3d9233baab
commit 25d5a2ac64
+3
View File
@@ -121,6 +121,9 @@ CMD_FUNC(cmd_setname)
spamfilter_build_user_string(spamfilter_user, client->name, client);
if (match_spamfilter(client, spamfilter_user, SPAMF_USER, "SETNAME", NULL, 0, NULL))
{
if (IsDead(client))
return; /* Killed, don't bother anymore */
/* Was rejected by spamfilter, restore the realname */
if (HasCapabilityFast(client, CAP_SETNAME))
{