- /* Now generate the G-line. */
- target[0] = '*';
- target[1] = '@';
- strcpy(target + 2, data->client_ip);
- gline_add(self->name, target, zone->duration, reason, now, now, 1);
+ /* Expand elements of the message as necessary. */
+ do_expandos(reason + 5, sizeof(reason) - 5, message, "%txt%", (txt ? txt : "(no-txt)"), "%ip%", data->client_ip, NULL);
+
+ if (zone->debug) {
+ blacklist_debug("DNSBL match: [%s] %s (%s)", zone->zone, data->client_ip, reason);
+ } else {
+ /* Now generate the G-line. */
+ target[0] = '*';
+ target[1] = '@';
+ strcpy(target + 2, data->client_ip);
+ gline_add(self->name, target, zone->duration, reason, now, now, 0, 1);
+ }