3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Factoids: er, preserve the quotes in arguments

This commit is contained in:
Pragmatic Software 2019-06-08 17:57:31 -07:00
parent e0e9cbed25
commit 90f3d390bd

View File

@ -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;
}