From 75e3b6fb8a6626eb165f35ae585ed0acb4292c56 Mon Sep 17 00:00:00 2001 From: bw1 Date: Thu, 16 Mar 2017 17:31:18 +0100 Subject: [quizgr] a small correction --- _testing/config.yml | 1 - scripts/quizgr.pl | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/_testing/config.yml b/_testing/config.yml index b6a8f12..e26aefc 100644 --- a/_testing/config.yml +++ b/_testing/config.yml @@ -61,7 +61,6 @@ whitelist: - 'on' - osd - query - - quizgr - quizmaster-fr - quizmaster - quiz diff --git a/scripts/quizgr.pl b/scripts/quizgr.pl index 902f435..a2d36df 100644 --- a/scripts/quizgr.pl +++ b/scripts/quizgr.pl @@ -41,7 +41,7 @@ use strict; use vars qw($VERSION %IRSSI); use Irssi 20020217.1542 (); # Version 0.8.1 or perhaps get the most up to date irssi version -$VERSION = "0.7GR02"; +$VERSION = "0.7GR03"; %IRSSI = ( authors => "Athanasius Emilius Arvanitis based on Simon Huggins quiz 0.7", contact => "arvan", @@ -77,6 +77,8 @@ sub load_questions($$) { my $tag = $game->{'tag'}; my $channel = $game->{'channel'}; + $game->{'used_questions'}=[]; + my $server = Irssi::server_find_tag($tag); if (!defined $server) { @@ -540,7 +542,7 @@ sub check_answer($$$$) { #putting it in used if (@{$game->{'used_questions'}}){ ${$game->{'usedCounter'}} = @{$game->{'used_questions'}}; - } else {my ${$game->{'usedCounter'}}=0;} + } else {${$game->{'usedCounter'}}=0;} ${$game->{'used_questions'}}[${$game->{'usedCounter'}}]=${$game->{'the_question'}}; @@ -566,7 +568,7 @@ sub check_answer($$$$) { #putting it in used if (@{$game->{'used_questions'}}){ ${$game->{'usedCounter'}} = @{$game->{'used_questions'}}; - } else {my ${$game->{'usedCounter'}} =0;} + } else {${$game->{'usedCounter'}} =0;} ${$game->{'used_questions'}}[${$game->{'usedCounter'}}]=${$game->{'the_question'}}; -- cgit v1.2.3