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.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/data/rbot/plugins/host.rb b/data/rbot/plugins/host.rb
index ef8dc8bc..c5fbcdaa 100644
--- a/data/rbot/plugins/host.rb
+++ b/data/rbot/plugins/host.rb
@@ -1,13 +1,22 @@
class HostPlugin < Plugin
+ Config.register Config::StringValue.new('host.path',
+ :default => '/usr/bin/host',
+ :desc => _('Path to the host program'))
+
def help(plugin, topic="")
"host <domain> => query nameserver about domain names and zones for <domain>"
end
+
+ def host_path
+ @bot.config["host.path"]
+ 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)
+ m.reply Utils.safe_exec(host_path, m.params)
end
end
plugin = HostPlugin.new