diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-27 15:59:13 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-27 15:59:13 +0000 |
commit | 21949774b91eaec6ecde4eaa8ad121e2c0a36b87 (patch) | |
tree | 41a7601e168018ac203bad7ca8d7f9f82515bc28 /rbot/plugins/spell.rb | |
parent | 51cf09ec02d089bfdd80e5f728cfc92a234dc437 (diff) |
rearrange repo for packaging
Diffstat (limited to 'rbot/plugins/spell.rb')
-rw-r--r-- | rbot/plugins/spell.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/rbot/plugins/spell.rb b/rbot/plugins/spell.rb deleted file mode 100644 index 81ee1ac6..00000000 --- a/rbot/plugins/spell.rb +++ /dev/null @@ -1,36 +0,0 @@ -class SpellPlugin < Plugin - def help(plugin, topic="") - "spell <word> => check spelling of <word>, suggest alternatives" - end - def privmsg(m) - unless(m.params && m.params =~ /^\S+$/) - m.reply "incorrect usage: " + help(m.plugin) - return - end - p = IO.popen("ispell -a -S", "w+") - if(p) - p.puts m.params - p.close_write - p.each_line {|l| - if(l =~ /^\*/) - m.reply "#{m.params} may be spelled correctly" - return - elsif(l =~ /^\s*&.*: (.*)$/) - m.reply "#{m.params}: #$1" - return - elsif(l =~ /^\s*\+ (.*)$/) - m.reply "#{m.params} is presumably derived from " + $1.downcase - return - elsif(l =~ /^\s*#/) - m.reply "#{m.params}: no suggestions" - return - end - } - else - m.reply "couldn't exec ispell :(" - return - end - end -end -plugin = SpellPlugin.new -plugin.register("spell") |