From: pdbogen Date: Wed, 3 Sep 2008 16:07:41 +0000 (+0000) Subject: Modify listcommands to include the access level of various commands, and remove some... X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=4b1b5841add399ed7a30782078088504e67c2fd1;p=destult.git Modify listcommands to include the access level of various commands, and remove some old debugging from the MORSE command. git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@57 088b83a4-0077-4247-935c-42ec02c2848b --- diff --git a/commands.yaml b/commands.yaml index a5882c6..ae49473 100644 --- a/commands.yaml +++ b/commands.yaml @@ -107,7 +107,11 @@ LISTCOMMANDS: |- 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 ); } @@ -1268,11 +1272,9 @@ MORSE: |- 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 ); }