summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Command.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-27 16:00:50 +0000
committerfukachan <fukachan>2001-02-27 16:00:50 +0000
commitde534bd68533eb3b7da42690fdf112a22a969368 (patch)
treee240d75124b10eda3984bfd035f2e9b574494e4c /fml/lib/FML/Process/Command.pm
parent1b2afdbbe3c7a0233655501a0094415814795944 (diff)
downloadfml8-de534bd68533eb3b7da42690fdf112a22a969368.tar.gz
fml8-de534bd68533eb3b7da42690fdf112a22a969368.tar.bz2
fml8-de534bd68533eb3b7da42690fdf112a22a969368.zip
define $available_commands
$config->has_attribute(variable, attribute)
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) = " . $_);
+ }
}