]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/spell.rb
More minor plugin optimizations
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / spell.rb
index 81ee1ac6553f5b3f88e303a932a3220c551faa1a..199af3c64c1c98313a4ebaec830c7274685cdf10 100644 (file)
@@ -14,18 +14,23 @@ class SpellPlugin < Plugin
       p.each_line {|l|
         if(l =~ /^\*/)
           m.reply "#{m.params} may be spelled correctly"
+          p.close
           return
         elsif(l =~ /^\s*&.*: (.*)$/)
           m.reply "#{m.params}: #$1"
+          p.close
           return
         elsif(l =~ /^\s*\+ (.*)$/)
           m.reply "#{m.params} is presumably derived from " + $1.downcase
+          p.close
           return
         elsif(l =~ /^\s*#/)
           m.reply "#{m.params}: no suggestions"
+          p.close
           return
         end
       }
+      p.close
     else
       m.reply "couldn't exec ispell :("
       return