3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 13:12:42 +01:00

Fix factoid var expansion such that 0 can now be yielded

This commit is contained in:
Pragmatic Software 2017-09-02 00:27:01 -07:00
parent 5ee07e08d2
commit 793303fcde

View File

@ -418,7 +418,7 @@ sub expand_factoid_vars {
my @list = split(/\s|(".*?")/, $change);
my @mylist;
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));
$mylist[$line] =~ s/"//g;