From fc70a59fc9ac1750071537f56af5466e8cd9ce9e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 16 Feb 2007 20:49:30 +0000 Subject: quiz plugin: sometimes cmd_hint was not busting even when it should have --- data/rbot/plugins/quiz.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/rbot/plugins/quiz.rb b/data/rbot/plugins/quiz.rb index 65a52b91..cd835eb0 100644 --- a/data/rbot/plugins/quiz.rb +++ b/data/rbot/plugins/quiz.rb @@ -550,6 +550,8 @@ class QuizPlugin < Plugin when 1..1000 then 1 end + debug "Hintrange before: #{q.hintrange.inspect}" + # FIXME 2.0 UTF-8 num_chars.times do begin @@ -561,8 +563,10 @@ class QuizPlugin < Plugin m.reply "Hint: #{q.hint}" q.hinted = true + debug "Hintrange before: #{q.hintrange.inspect}" + # FIXME 2.0 UTF-8 - if q.hintrange.length == 0 + if q.hint == q.answer_array m.reply "#{Bold}#{Color}04BUST!#{Color}#{Bold} This round is over. #{Color}04Minus one point for #{nick}#{Color}." stats = nil -- cgit v1.2.3