]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - data/rbot/plugins/host.rb
make sure @commands is never nil in script.rb
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / host.rb
1 class HostPlugin < Plugin
2   def help(plugin, topic="")
3     "host <domain> => query nameserver about domain names and zones for <domain>"
4   end
5   def privmsg(m)
6     unless(m.params =~ /^(\w|-|\.)+$/)
7       m.reply "incorrect usage: " + help(m.plugin)
8       return
9     end
10     m.reply Utils.safe_exec("host", m.params)
11   end
12 end
13 plugin = HostPlugin.new
14 plugin.register("host")