summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-06-24 01:33:48 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-06-24 01:40:11 +0200
commit1c6b09968776c94b812317dfc4f91f09b5f0817c (patch)
tree91070b9f291798964181a60026398a9d5d27404c /data/rbot
parentaac060923bb64774d4a54a1dd8e5c1dfc2a70a4f (diff)
spell plugin: command line option
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/spell.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/data/rbot/plugins/spell.rb b/data/rbot/plugins/spell.rb
index 3d77ebb0..9ab1deba 100644
--- a/data/rbot/plugins/spell.rb
+++ b/data/rbot/plugins/spell.rb
@@ -7,6 +7,9 @@ class SpellPlugin < Plugin
Config.register Config::StringValue.new('spell.program',
:default => 'ispell',
:desc => _('Program to use to check spelling'))
+ Config.register Config::StringValue.new('spell.command_line',
+ :default => '%s -a -S',
+ :desc => _('Command line used to call the spell.program. Use %s as a placeholder for the executable name'))
def help(plugin, topic="")
_("spell <word> => check spelling of <word>, suggest alternatives")
@@ -18,7 +21,7 @@ class SpellPlugin < Plugin
end
begin
- IO.popen("%{prog} -a -S" % {:prog => @bot.config['spell.program']}, "w+") { |p|
+ IO.popen(@bot.config['spell.command_line'] % @bot.config['spell.program'], "w+") { |p|
p.puts m.params
p.close_write
p.each_line { |l|