diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-12-07 12:58:47 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-12-07 12:58:47 +0000 |
commit | 728d83c720089c552e91fffad9c38d8793e6efe1 (patch) | |
tree | e49731236ab88c8eea79da253844e72908477443 | |
parent | de13b3d387dfff33d2d1e67eec0018d6a35f00be (diff) |
wheelfortune: say when there are no scores
-rw-r--r-- | data/rbot/plugins/games/wheelfortune.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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| |