diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 9de9fc57..d949ec9e 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -313,9 +313,8 @@ sub find_factoid { } else { $command = $1; } - my @args = $self->{pbot}->{interpreter}->split_line($command, 1); - $keyword = shift @args; - $arguments = join ' ', @args; + my $arglist = $self->{pbot}->{interpreter}->make_args($command); + ($keyword, $arguments) = $self->{pbot}->{interpreter}->split_args($arglist, 2); goto NEXT_DEPTH; } @@ -343,9 +342,8 @@ sub find_factoid { if ($find_alias) { my $command = $self->{factoids}->hash->{$channel}->{$trigger}->{action}; - my @args = $self->{pbot}->{interpreter}->split_line($command, 1); - $keyword = shift @args; - $arguments = join ' ', @args; + my $arglist = $self->{pbot}->{interpreter}->make_args($command); + ($keyword, $arguments) = $self->{pbot}->{interpreter}->split_args($arglist, 2); $string = $keyword . (length $arguments ? " $arguments" : ""); goto NEXT_DEPTH; }