summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/host.rb
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 15:59:13 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 15:59:13 +0000
commit21949774b91eaec6ecde4eaa8ad121e2c0a36b87 (patch)
tree41a7601e168018ac203bad7ca8d7f9f82515bc28 /data/rbot/plugins/host.rb
parent51cf09ec02d089bfdd80e5f728cfc92a234dc437 (diff)
rearrange repo for packaging
Diffstat (limited to 'data/rbot/plugins/host.rb')
-rw-r--r--data/rbot/plugins/host.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/data/rbot/plugins/host.rb b/data/rbot/plugins/host.rb
new file mode 100644
index 00000000..ef8dc8bc
--- /dev/null
+++ b/data/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")