From c756c87be2a46cc12c7190c578e73f604bec01de Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 18 Nov 2022 12:25:30 +0100 Subject: [PATCH] Update blacklist::reason changing the $variables there. This changes the work of commit 2cf60f66a3a35996d351d33e3e03c16fde891e26. $ip: IP address of the banned user $server: name of the IRC server $blacklist: name of the blacklist block (eg. xyz for blacklist xyz { }) $dnsname: the blacklist::dns::name $dnsreply: DNS reply code Previously there was a $name which was ambigious in the sense that it could mean blacklist name or dns name, now we simply avoid using $name altogether and use $dnsname and (new) $blacklist. --- src/modules/blacklist.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/blacklist.c b/src/modules/blacklist.c index f3f61acad..d29b3c2c7 100644 --- a/src/modules/blacklist.c +++ b/src/modules/blacklist.c @@ -785,12 +785,15 @@ void blacklist_hit(Client *client, Blacklist *bl, int reply) value[0] = GetIP(client); name[1] = "server"; value[1] = me.name; - name[2] = "name"; - value[2] = bl->backend->dns->name; - name[3] = "reply"; - value[3] = reply_num; - name[4] = NULL; - value[4] = NULL; + name[2] = "blacklist"; + value[2] = bl->name; + name[3] = "dnsname"; + value[3] = bl->backend->dns->name; + name[4] = "dnsreply"; + value[4] = reply_num; + name[5] = NULL; + value[5] = NULL; + /* when adding more, be sure to update the array elements number in the definition of const char *name[] and value[] */ buildvarstring(bl->reason, banbuf, sizeof(banbuf), name, value);