mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 10:34:52 +01:00
Factoids: add requires_arguments
metadata to tell usage
metadata if a usage is required in a pipe or other expansion
This commit is contained in:
parent
563f8da40f
commit
bffbc8b3d0
@ -841,7 +841,7 @@ sub interpreter {
|
|||||||
|
|
||||||
my $action;
|
my $action;
|
||||||
|
|
||||||
if (exists $self->{factoids}->hash->{$channel}->{$keyword}->{usage} and not length $stuff->{arguments}) {
|
if (exists $self->{factoids}->hash->{$channel}->{$keyword}->{usage} and not length $stuff->{arguments} and $self->{factoids}->hash->{$channel}->{$keyword}->{requires_arguments}) {
|
||||||
$stuff->{alldone} = 1;
|
$stuff->{alldone} = 1;
|
||||||
my $usage = $self->{factoids}->hash->{$channel}->{$keyword}->{usage};
|
my $usage = $self->{factoids}->hash->{$channel}->{$keyword}->{usage};
|
||||||
$usage =~ s/\$0/$keyword/g;
|
$usage =~ s/\$0/$keyword/g;
|
||||||
|
Loading…
Reference in New Issue
Block a user