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

Fix SETNAME not working, reported by s and The_Myth in

https://bugs.unrealircd.org/view.php?id=5453
It had the match_spamfilter() logic reversed. I audited all other
calls to the function as well and they are fine.

Also, CHGHOST CHGIDENT CHGNAME SETHOST SETIDENT SETNAME are now
tested by the test framework.
This commit is contained in:
Bram Matthys
2019-10-19 08:35:59 +02:00
parent 04171f7f20
commit 5960c76102
+1 -1
View File
@@ -89,7 +89,7 @@ CMD_FUNC(cmd_setname)
/* set the new name before we check, but don't send to servers unless it is ok */
strcpy(client->info, parv[1]);
spamfilter_build_user_string(spamfilter_user, client->name, client);
if (!match_spamfilter(client, spamfilter_user, SPAMF_USER, NULL, 0, NULL))
if (match_spamfilter(client, spamfilter_user, SPAMF_USER, NULL, 0, NULL))
{
/* Was rejected by spamfilter, restore the realname */
strcpy(client->info, tmpinfo);