diff options
author | Alexander Beisig <alexander.beisig@gmx.de> | 2006-07-17 20:28:18 +0000 |
---|---|---|
committer | Alexander Beisig <alexander.beisig@gmx.de> | 2006-07-17 20:28:18 +0000 |
commit | 1b8dffbc43b3716ce32086e2e1f88e92adc5056a (patch) | |
tree | cd204380a33c00a5af86834694bac4c193cbc600 /data/rbot | |
parent | fe11699daa7fb163fbcae00255f031719d50a38c (diff) |
Fixed chucknorris.rb debug output
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/chucknorris.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/data/rbot/plugins/chucknorris.rb b/data/rbot/plugins/chucknorris.rb index 920757c6..b4cec84e 100644 --- a/data/rbot/plugins/chucknorris.rb +++ b/data/rbot/plugins/chucknorris.rb @@ -17,11 +17,11 @@ class ChuckNorrisPlugin < Plugin raise "Error: Couldn't find chucknorris.yml[.gz]" end - puts "+ [chucknorris] Loading #{path}..." + debug "+ [chucknorris] Loading #{path}..." @@facts = YAML.load(fyml).map{|fact,(score,votes)| votes >= MIN_VOTES ? [score,fact] : nil}.compact - puts "+ [chucknorris] #{@@facts.length} Chuck Norris facts loaded..." - puts " Random fact: #{@@facts[rand(@@facts.size)].inspect}" + debug "+ [chucknorris] #{@@facts.length} Chuck Norris facts loaded..." + debug " Random fact: #{@@facts[rand(@@facts.size)].inspect}" super end @@ -46,11 +46,11 @@ class ChuckNorrisPlugin < Plugin # The meat. def fact(m, params) min = params[:minrating].to_f - puts "+ Getting Chuck Norris fact (rating > #{min})..." + debug "+ Getting Chuck Norris fact (rating > #{min})..." viable_facts = @@facts.select {|rating, fact| rating >= min} if viable_facts.empty? - puts " - no facts found with rating >= #{min}" + debug " - no facts found with rating >= #{min}" m.reply "Are you nuts?!? There are no facts better than #{min}!!!" return end |