diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-01-07 16:23:01 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-01-07 16:23:01 +0000 |
commit | ed6ecc160458aa1288691f833c251f6dba4b3ed6 (patch) | |
tree | 1f24e9ddaae56f64c72fc7f63937104e5747737a /data/rbot/plugins | |
parent | d500e727e027b04a3542237bbe9c4c75489427ad (diff) |
Make sure the quiz plugin doesn't fail when win messages haven't been found
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/quiz.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/data/rbot/plugins/quiz.rb b/data/rbot/plugins/quiz.rb index 2757c4a0..67cd15b8 100644 --- a/data/rbot/plugins/quiz.rb +++ b/data/rbot/plugins/quiz.rb @@ -101,6 +101,8 @@ class QuizPlugin < Plugin IO.foreach("#{@bot.botclass}/quiz/win_messages") { |line| @win_messages << line.chomp } else warning( "win_messages file not found!" ) + # Fill the array with a least one message or code accessing it would fail + @win_messages << "<who> guessed right! The answer was <answer>" end # TODO: Make this configurable, and add support for more than one file (there's a size limit in linux too ;) ) |