summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Command.pm
diff options
context:
space:
mode:
Diffstat (limited to 'fml/lib/FML/Process/Command.pm')
-rw-r--r--fml/lib/FML/Process/Command.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index be7941c7..917f37d0 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -89,10 +89,15 @@ sub finish
sub _evaluate_command
{
my ( $curproc ) = @_;
- my $body = $curproc->{ incoming_message }->{ body }->get_content_body;
- my @body = split(/\n/, $body);
-
- for (@body) { Log($_);}
+ my $config = $curproc->{ config };
+ my $body = $curproc->{ incoming_message }->{ body }->get_content_body;
+ my @body = split(/\n/, $body);
+
+ for (@body) {
+ my $valid = $config->has_attribute( "available_commands", $_ )
+ ? "valid" : "invalid";
+ Log("command($valid) = " . $_);
+ }
}