]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix regression in the quiz plugin: The same winning messages would be repeated over...
authorMark Kretschmann <markey@web.de>
Mon, 4 Sep 2006 09:08:37 +0000 (09:08 +0000)
committerMark Kretschmann <markey@web.de>
Mon, 4 Sep 2006 09:08:37 +0000 (09:08 +0000)
data/rbot/plugins/quiz.rb

index 9e7aa4548f125f03a1f84ce4d0efede646de585c..eeef338e615e198ce9ba1ce1faebb4a222f614f2 100644 (file)
@@ -264,7 +264,7 @@ class QuizPlugin < Plugin
       elsif    q.rank_table.length >= 3 and m.sourcenick.to_s == q.rank_table[2][0]
         reply = "THE THIRD CHAMPION strikes again! Give it all #{m.sourcenick.to_s}, with #{q.rank_table[1][1].score - q.rank_table[2][1].score - 1} more points you'll reach the 2nd place! Answer was: #{q.answer}"
       else
-        reply = @win_messages[rand( @win_messages.length )]
+        reply = @win_messages[rand( @win_messages.length )].dup
         reply.gsub!( "<who>", m.sourcenick )
         reply.gsub!( "<answer>", q.answer )
       end