diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index da57ba53..fad3a26c 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -614,8 +614,7 @@ sub factunset { my ($channel, $trigger, $arguments) = $self->find_factoid_with_optional_channel($from, $args, 'factunset', $usage, 1); return $channel if not defined $trigger; # if $trigger is not defined, $channel is an error message - my $arglist = $self->{pbot}->{interpreter}->make_args($arguments); - my ($key) = $self->{pbot}->{interpreter}->split_args($arglist, 1); + my ($key) = $self->{pbot}->{interpreter}->split_line($arguments, 1); return $usage if not length $key; diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 64d21e89..9de9fc57 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -313,7 +313,9 @@ sub find_factoid { } else { $command = $1; } - ($keyword, $arguments) = split /\s+/, $command, 2; + my @args = $self->{pbot}->{interpreter}->split_line($command, 1); + $keyword = shift @args; + $arguments = join ' ', @args; goto NEXT_DEPTH; } @@ -341,7 +343,9 @@ sub find_factoid { if ($find_alias) { my $command = $self->{factoids}->hash->{$channel}->{$trigger}->{action}; - ($keyword, $arguments) = split /\s+/, $command, 2; + my @args = $self->{pbot}->{interpreter}->split_line($command, 1); + $keyword = shift @args; + $arguments = join ' ', @args; $string = $keyword . (length $arguments ? " $arguments" : ""); goto NEXT_DEPTH; }