summaryrefslogtreecommitdiff
path: root/rbot
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-16 01:20:54 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-16 01:20:54 +0000
commitb936c58c119eeea7b5ab1fc31d25724bd949ea9d (patch)
treec1a13b999b6ae45e79dcdad5b42dfaa45564914f /rbot
parentb59c4293feddf796d2306dd4b69cb92faff8a802 (diff)
that wasn't ideal
Diffstat (limited to 'rbot')
-rw-r--r--rbot/plugins/fortune.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/rbot/plugins/fortune.rb b/rbot/plugins/fortune.rb
index fd90f69b..6d077c85 100644
--- a/rbot/plugins/fortune.rb
+++ b/rbot/plugins/fortune.rb
@@ -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)