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

Remove unnecessary logic

This commit is contained in:
Pragmatic Software 2015-07-23 17:46:33 -07:00
parent cc9f4926ee
commit bded959ba4

View File

@ -355,11 +355,11 @@ sub expand_factoid_vars {
next if not @factoids;
my ($var_chan, $var) = ($factoids[0]->[0], $factoids[0]->[1]);
if(@factoids && $self->{factoids}->hash->{$var_chan}->{$var}->{type} eq 'text') {
if ($self->{factoids}->hash->{$var_chan}->{$var}->{type} eq 'text') {
my $change = $self->{factoids}->hash->{$var_chan}->{$var}->{action};
my @list = split(/\s|(".*?")/, $change);
my @mylist;
for(my $i = 0; $i <= $#list; $i++) {
for (my $i = 0; $i <= $#list; $i++) {
push @mylist, $list[$i] if $list[$i];
}
my $line = int(rand($#mylist + 1));