From 5960c7610204ca9f66ed2459eb18ebe7f2ed3ce5 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 19 Oct 2019 08:35:59 +0200 Subject: [PATCH] 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. --- src/modules/setname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/setname.c b/src/modules/setname.c index c1affab69..2e30a9ee8 100644 --- a/src/modules/setname.c +++ b/src/modules/setname.c @@ -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);