1 class HostPlugin < Plugin
2 Config.register Config::StringValue.new('host.path',
4 :desc => _('Path to the host program'))
6 def help(plugin, topic="")
7 "host <domain> => query nameserver about domain names and zones for <domain>"
11 @bot.config["host.path"]
15 unless(m.params =~ /^(\w|-|\.)+$/)
16 m.reply "incorrect usage: " + help(m.plugin)
19 m.reply Utils.safe_exec(host_path, m.params)
22 plugin = HostPlugin.new
23 plugin.register("host")