An Eggdrop IRC bot script that checks users joining channels against DNS blacklists (RBLs) and automatically bans them if listed. The configuration format is similar to BOPM.
- Tcl >= 8.5
- tcllib >= 1.10
- Eggdrop IRC bot
- Copy
zapdnsbl.tclandzapdnsbl.initoyour_eggdrop/scripts/zapdnsbl/ - Add the following line to your
eggdrop.conf:source scripts/zapdnsbl/zapdnsbl.tcl - Reload (rehash) or restart your bot
Copy zapdnsbl.ini.dist to zapdnsbl.ini and customize as needed.
Enable or disable DNSBL checking per channel:
.chanset #channel +zapdnsbl # Enable
.chanset #channel -zapdnsbl # Disable
Set ban duration (in minutes, default is 120):
.chanset #channel zapdnsbl.bantime 60
Enable public command for users:
.chanset #channel +zapdnsbl.pubcmd
Blacklists are configured in zapdnsbl.ini. Each blacklist is defined as a section with the format [bl:hostname]:
[bl:dnsbl.dronebl.org]
ban_unknown=false
default_ban_message=Your host is listed in the DroneBL (%reason%). http://dronebl.org/lookup_branded.do?ip=%ip% for info.
reply:3=IRC Drone
reply:5=Bottler
reply:8=SOCKS Proxy
reply:9=HTTP ProxyOptions:
ban_unknown- Set totrueto ban even when the reply code is not recognizeddefault_ban_message- Ban message template. Supports%reason%and%ip%placeholdersreply:N- Maps DNSBL reply code N to a human-readable reason
For networks using WebIRC where the client IP is hex-encoded in the ident (e.g., A1B2C3D4@gateway.example.com), configure the webirc_hosts pattern in the [global] section:
[global]
webirc_hosts=.*(\.mibbit\.com|\.kiwiirc\.com)| Command | Description |
|---|---|
.zapblcheck <host> |
Check if a host/IP is listed in any configured DNSBL |
.zapblconfig bl list |
List all configured blacklists and their settings |
Requires +zapdnsbl.pubcmd to be enabled on the channel.
| Command | Description |
|---|---|
!zapblcheck <host> |
Check if a host/IP is listed in any configured DNSBL |
Users with the following flags are exempt from DNSBL checks:
f(friend)o(op)v(voice)
These can be global or channel-specific flags.
Debug output is sent to the console with flag d. To view debug messages:
.console +d
GNU General Public License v2.0 - see LICENSE for details.