summaryrefslogtreecommitdiffstats
path: root/scripts/quizgr.pl
diff options
context:
space:
mode:
authorbw12017-03-16 17:31:18 +0100
committerbw12017-03-16 17:31:18 +0100
commit75e3b6fb8a6626eb165f35ae585ed0acb4292c56 (patch)
treec3bb793f2f71b76e7a72de5349cb6b5ec1bdf11d /scripts/quizgr.pl
parent575da99778c903e6efb43dd878e0d8c70eb827c2 (diff)
downloadscripts.irssi.org-75e3b6fb8a6626eb165f35ae585ed0acb4292c56.tar.bz2
[quizgr] a small correction
Diffstat (limited to 'scripts/quizgr.pl')
-rw-r--r--scripts/quizgr.pl8
1 files changed, 5 insertions, 3 deletions
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'}};