From bffbc8b3d0daf1dbfc675e4ffc4ea4a48652f3a9 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 3 Jun 2019 08:50:42 -0700 Subject: [PATCH] Factoids: add `requires_arguments` metadata to tell `usage` metadata if a usage is required in a pipe or other expansion --- PBot/Factoids.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index bdca2195..b4808f41 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -841,7 +841,7 @@ sub interpreter { 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; my $usage = $self->{factoids}->hash->{$channel}->{$keyword}->{usage}; $usage =~ s/\$0/$keyword/g;