New command /host

Looks up the host for an IP, including .nohost lookups.
This commit is contained in:
Guangcong Luo 2015-06-16 17:52:59 -04:00
parent 7f2b9ec88f
commit 6010cbac19

View File

@ -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) {