mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 10:34:52 +01:00
Factoids: add require_explicit_args metadata to prevent $args from appending undesirably in aliases
This commit is contained in:
parent
b838a08f8d
commit
bebddb5ea9
@ -1004,7 +1004,9 @@ sub handle_action {
|
|||||||
# Check if it's an alias
|
# Check if it's an alias
|
||||||
if ($action =~ /^\/call\s+(.*)$/) {
|
if ($action =~ /^\/call\s+(.*)$/) {
|
||||||
my $command = $1;
|
my $command = $1;
|
||||||
|
unless ($self->{factoids}->hash->{$channel}->{$keyword}->{'require_explicit_args'}) {
|
||||||
$command .= " $stuff->{original_arguments}" if length $stuff->{original_arguments} and not $stuff->{aliased} and not $stuff->{special} eq 'code-factoid';
|
$command .= " $stuff->{original_arguments}" if length $stuff->{original_arguments} and not $stuff->{aliased} and not $stuff->{special} eq 'code-factoid';
|
||||||
|
}
|
||||||
|
|
||||||
if ($command =~ s/\s*--keyword-override=([^ ]+)\s*//) {
|
if ($command =~ s/\s*--keyword-override=([^ ]+)\s*//) {
|
||||||
$stuff->{keyword_override} = $1;
|
$stuff->{keyword_override} = $1;
|
||||||
|
Loading…
Reference in New Issue
Block a user