From 728d83c720089c552e91fffad9c38d8793e6efe1 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 7 Dec 2007 12:58:47 +0000 Subject: wheelfortune: say when there are no scores --- data/rbot/plugins/games/wheelfortune.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/rbot/plugins/games/wheelfortune.rb b/data/rbot/plugins/games/wheelfortune.rb index 7bdd42bd..e8853cc6 100644 --- a/data/rbot/plugins/games/wheelfortune.rb +++ b/data/rbot/plugins/games/wheelfortune.rb @@ -273,6 +273,10 @@ class WheelOfFortune < Plugin def score_table(chan, game, opts={}) limit = opts[:limit] || -1 table = game.score_table[0..limit] + if table.length == 0 + @bot.say chan, _("no scores") + return + end nick_wd = table.map { |a| a.first.length }.max score_wd = table.first.last.to_s.length table.each { |t| -- cgit v1.2.3