Modify listcommands to include the access level of various commands, and remove some...
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 3 Sep 2008 16:07:41 +0000 (16:07 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 3 Sep 2008 16:07:41 +0000 (16:07 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@57 088b83a4-0077-4247-935c-42ec02c2848b

commands.yaml

index a5882c6..ae49473 100644 (file)
@@ -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 );
   }