diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2004-10-09 01:51:05 +0000 |
commit | 0f3e302547363ea237454dda891ddb5de1be4476 (patch) | |
tree | ec45be24a669ee28b5e2da4ff65e39265a418e0b /rbot/plugins/host.rb |
initial import of rbot
Diffstat (limited to 'rbot/plugins/host.rb')
-rw-r--r-- | rbot/plugins/host.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rbot/plugins/host.rb b/rbot/plugins/host.rb new file mode 100644 index 00000000..cb88eee7 --- /dev/null +++ b/rbot/plugins/host.rb @@ -0,0 +1,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") |