mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-18 14:30:40 +01:00
Fix factoid var expansion such that 0 can now be yielded
This commit is contained in:
parent
5ee07e08d2
commit
793303fcde
@ -418,7 +418,7 @@ sub expand_factoid_vars {
|
|||||||
my @list = split(/\s|(".*?")/, $change);
|
my @list = split(/\s|(".*?")/, $change);
|
||||||
my @mylist;
|
my @mylist;
|
||||||
for (my $i = 0; $i <= $#list; $i++) {
|
for (my $i = 0; $i <= $#list; $i++) {
|
||||||
push @mylist, $list[$i] if $list[$i];
|
push @mylist, $list[$i] if defined $list[$i];
|
||||||
}
|
}
|
||||||
my $line = int(rand($#mylist + 1));
|
my $line = int(rand($#mylist + 1));
|
||||||
$mylist[$line] =~ s/"//g;
|
$mylist[$line] =~ s/"//g;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user