Update blacklist::reason changing the $variables there.

This changes the work of commit 2cf60f66a3.
    $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.
This commit is contained in:
Bram Matthys 2022-11-18 12:25:30 +01:00
parent 475fe46d95
commit c756c87be2
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98

View file

@ -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);