# :title: Spell plugin
class SpellPlugin < Plugin
- Config.register Config::StringValue.new('spell.program',
+ Config.register Config::StringValue.new('spell.path',
:default => 'ispell',
- :desc => _('Program to use to check spelling'))
+ :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'))
def help(plugin, topic="")
_("spell <word> => check spelling of <word>, suggest alternatives")
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|