my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
my $reply = "I have the following commands: ";
foreach( keys( %{ $heap->{ 'commands' } } ) ) {
- $reply .= $_." ";
+ $reply .= $_;
+ if( exists( $heap->{ 'cmdaccess' }->{ uc( $_ ) } ) ) {
+ $reply .= "(".$heap->{ 'cmdaccess' }->{ uc( $_ ) }.")";
+ }
+ $reply .= " ";
}
$kernel->post( $src, $replypath, $reply, $dest );
}
if( $ch eq ' ' ) {
$result .= " ";
} elsif( exists( $morse{ $ch } ) ) {
- print( "$ch => ".$morse{ $ch }, "\n" );
$result .= $morse{ $ch }." ";
}
}
- print( $result, "\n" );
$kernel->post( $src, $replypath, $result, $dest );
}