mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19: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;
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user