X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fspell.rb;h=ba5cfc19f09550571fb2400af0f2f874088c1b7b;hb=90656f4203a0a989b6fb110d4a07598dd186b84c;hp=9298c2861c1cff65d5563e95f084ee59e0f78a13;hpb=0a9b24b1be678371a661785445878a76b9a873ec;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/spell.rb b/data/rbot/plugins/spell.rb index 9298c286..ba5cfc19 100644 --- a/data/rbot/plugins/spell.rb +++ b/data/rbot/plugins/spell.rb @@ -5,11 +5,11 @@ class SpellPlugin < Plugin Config.register Config::StringValue.new('spell.path', - :default => '/usr/bin/ispell', + :default => 'ispell', :desc => _('Path to the 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')) + :desc => _('Command line used to call the spell.path. Use %s as a placeholder for the executable name')) def help(plugin, topic="") _("spell => check spelling of , suggest alternatives") @@ -21,7 +21,7 @@ class SpellPlugin < Plugin end begin - IO.popen(@bot.config['spell.command_line'] % @bot.config['spell.program'], "w+") { |p| + IO.popen(@bot.config['spell.command_line'] % @bot.config['spell.path'], "w+") { |p| p.puts m.params p.close_write p.each_line { |l| @@ -39,11 +39,11 @@ class SpellPlugin < Plugin } } rescue - m.reply(_("couldn't exec %{prog} :(") % {:prog => @bot.config['spell.program']}) + m.reply(_("couldn't exec %{prog} :(") % {:prog => @bot.config['spell.path']}) return end m.reply(_("something odd happened while checking %{word} with %{prog}") % { - :word => m.params, :prog => @bot.config['spell.program'] + :word => m.params, :prog => @bot.config['spell.path'] }) end end