This commit is contained in:
reality 2015-10-20 18:29:05 +00:00
parent 2d0fa7fe59
commit e88f2a70b1

View File

@ -43,16 +43,17 @@ var dns = function(dbot) {
}, },
'~dnsbl': function(event) { '~dnsbl': function(event) {
var revIp = event.message.trim().split('.').reverse().join('.'); var revIp = event.input[1].trim().split('.').reverse().join('.');
dnsm.lookup(revIp + '.cbl.abuseat.org', function(err, res) { dnsm.lookup(revIp + '.cbl.abuseat.org', function(err, res) {
if(!err && res) { if(!err && res) {
event.reply(event.message + ' is listed as an abusive IP.'); event.reply(event.input[1] + ' is listed as an abusive IP.');
} else { } else {
event.reply(event.message + ' does not seem to be a Naughty Nancy.'); event.reply(event.input[1] + ' does not seem to be a Naughty Nancy.');
} }
}); });
} }
}; };
commands['~dnsbl'].regex = [/^dnsbl ([\d\w\s-]*)/, 2];
this.commands = commands; this.commands = commands;
this.on = 'PRIVMSG'; this.on = 'PRIVMSG';