diff options
| author | ailin-nemui | 2017-03-16 20:41:01 +0100 | 
|---|---|---|
| committer | GitHub | 2017-03-16 20:41:01 +0100 | 
| commit | 011c7e0ba2c943ab0e73b4ad90599c735a4f1e4f (patch) | |
| tree | e94d1ec1300da6b8c744ed9ff254347d4fe7c0e9 | |
| parent | abf7c070f2a8ee0497d068395419351f0d141a0f (diff) | |
| parent | 75e3b6fb8a6626eb165f35ae585ed0acb4292c56 (diff) | |
| download | scripts.irssi.org-011c7e0ba2c943ab0e73b4ad90599c735a4f1e4f.tar.bz2 | |
Merge pull request #369 from bw1/quizgr
[quizgr] a small correction
| -rw-r--r-- | _testing/config.yml | 1 | ||||
| -rw-r--r-- | scripts/quizgr.pl | 8 | 
2 files changed, 5 insertions, 4 deletions
| diff --git a/_testing/config.yml b/_testing/config.yml index 4ebe499..742e127 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'}}; | 
