mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 05:32:50 +01:00
mesg
This commit is contained in:
parent
b49b9b99c4
commit
04d797c6d3
@ -56,7 +56,20 @@ var dns = function(dbot) {
|
||||
commands['~dnsbl'].regex = [/^dnsbl ([\d\w\s\.-]*)/, 2];
|
||||
this.commands = commands;
|
||||
|
||||
this.on = 'PRIVMSG';
|
||||
if(this.config.dnsblconn == true) {
|
||||
this.listener = function(event) {
|
||||
if(event.message.match('CLICONN')) {
|
||||
var ip = event.message.match('CLICONN ([^ ]+).*?((?:[0-9]{1,3}\.){3}[0-9]{1,3}) users');
|
||||
revIp = ip[2].trim().split('.').reverse().join('.');
|
||||
dnsm.lookup(revIp + '.cbl.abuseat.org', function(err, res) {
|
||||
if(!err && res) {
|
||||
dbot.say(event.server, '#dnsbl', 'ALERT: ' + ip[1] + ' connecting from ' + ip[2] + ' may well be NAUGHTY.');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.on = 'NOTICE';
|
||||
}
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
Loading…
Reference in New Issue
Block a user