]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
that wasn't ideal
authorTom Gilbert <tom@linuxbrit.co.uk>
Sat, 16 Jul 2005 01:20:54 +0000 (01:20 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Sat, 16 Jul 2005 01:20:54 +0000 (01:20 +0000)
rbot/plugins/fortune.rb

index fd90f69bfb5e0f054d0d5d50eaee0b86d6aebc19..6d077c85322cd9ce5d27ed56c61af03329b0e25a 100644 (file)
@@ -17,7 +17,10 @@ class FortunePlugin < Plugin
     end
     fortune = nil
     ["/usr/games/fortune", "/usr/bin/fortune", "/usr/local/bin/fortune"].each {|f|
-      fortune = f if FileTest.executable? f
+      if FileTest.executable? f
+        fortune = f
+        break
+      end
     }
     m.reply "fortune not found" unless fortune
     ret = Utils.safe_exec(fortune, "-n", "255", "-s", db)