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:
parent
cc9f4926ee
commit
bded959ba4
@ -355,11 +355,11 @@ sub expand_factoid_vars {
|
|||||||
next if not @factoids;
|
next if not @factoids;
|
||||||
my ($var_chan, $var) = ($factoids[0]->[0], $factoids[0]->[1]);
|
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 $change = $self->{factoids}->hash->{$var_chan}->{$var}->{action};
|
||||||
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 $list[$i];
|
||||||
}
|
}
|
||||||
my $line = int(rand($#mylist + 1));
|
my $line = int(rand($#mylist + 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user