summaryrefslogtreecommitdiff
path: root/lib/rbot/plugins/host.rb
blob: ef8dc8bc193c3b933152f3b0de10e79a935e0b0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class HostPlugin < Plugin
  def help(plugin, topic="")
    "host <domain> => query nameserver about domain names and zones for <domain>"
  end
  def privmsg(m)
    unless(m.params =~ /^(\w|-|\.)+$/)
      m.reply "incorrect usage: " + help(m.plugin)
      return
    end
    m.reply Utils.safe_exec("host", m.params)
  end
end
plugin = HostPlugin.new
plugin.register("host")