From 6010cbac1925e93d2dc3f8caa73e3213d93a700c Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 16 Jun 2015 17:52:59 -0400 Subject: [PATCH] New command /host Looks up the host for an IP, including .nohost lookups. --- chat-plugins/info.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chat-plugins/info.js b/chat-plugins/info.js index ea4034ce0f..c21cd5c06e 100644 --- a/chat-plugins/info.js +++ b/chat-plugins/info.js @@ -95,6 +95,15 @@ var commands = exports.commands = { whoishelp: ["/whois - Get details on yourself: alts, group, IP address, and rooms.", "/whois [username] - Get details on a username: alts (Requires: % @ & ~), group, IP address (Requires: @ & ~), and rooms."], + host: function (target, room, user, connection, cmd) { + if (!this.can('rangeban')) return; + var self = this; + Dnsbl.reverse(target, function(err, hosts) { + self.sendReply('IP ' + target + ': ' + (hosts ? hosts[0] : 'NULL')); + }); + }, + hosthelp: ["/host [ip] - Gets the host for a given IP. Requires: & ~"], + ipsearchall: 'ipsearch', hostsearch: 'ipsearch', ipsearch: function (target, room, user, connection, cmd) {