summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/host.rb
diff options
context:
space:
mode:
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")