mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-04 08:24:06 +01:00
Factoids: Remove use of shellwords
This commit is contained in:
parent
51fa020de2
commit
5cf13c1bdd
@ -619,10 +619,7 @@ sub expand_action_arguments {
|
|||||||
$action =~ s/\$args(?![[\w])/$input/g;
|
$action =~ s/\$args(?![[\w])/$input/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $qinput = quotemeta $input;
|
my @args = $self->{pbot}->{interpreter}->split_line($input);
|
||||||
$qinput =~ s/\\ / /g;
|
|
||||||
my @args = shellwords($qinput);
|
|
||||||
|
|
||||||
$action =~ s/\$arglen\b/scalar @args/eg;
|
$action =~ s/\$arglen\b/scalar @args/eg;
|
||||||
|
|
||||||
my $depth = 0;
|
my $depth = 0;
|
||||||
@ -966,7 +963,6 @@ sub handle_action {
|
|||||||
if ($self->{factoids}->hash->{$channel}->{$keyword}->{type} eq 'text') {
|
if ($self->{factoids}->hash->{$channel}->{$keyword}->{type} eq 'text') {
|
||||||
my $target = $self->{pbot}->{nicklist}->is_present_similar($stuff->{from}, $stuff->{arguments});
|
my $target = $self->{pbot}->{nicklist}->is_present_similar($stuff->{from}, $stuff->{arguments});
|
||||||
|
|
||||||
|
|
||||||
if ($target and $action !~ /\$(?:nick|args)\b/) {
|
if ($target and $action !~ /\$(?:nick|args)\b/) {
|
||||||
$stuff->{nickoverride} = $target unless $stuff->{force_nickoverride};
|
$stuff->{nickoverride} = $target unless $stuff->{force_nickoverride};
|
||||||
$stuff->{no_nickoverride} = 0;
|
$stuff->{no_nickoverride} = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user