Print usage for karma with no arguments
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 15 Oct 2008 04:51:14 +0000 (04:51 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 15 Oct 2008 04:51:14 +0000 (04:51 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@67 088b83a4-0077-4247-935c-42ec02c2848b

commands.yaml

index 1059a4a..e43884b 100644 (file)
@@ -1632,6 +1632,10 @@ KARMAUP: |-
 KARMA: |-
   sub {
     my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
+    if( $what =~ /^[[:space:]]*$/ ) {
+      $kernel->post( $src, $replypath, "Usage: Karma {<Victim>,{+,-}<N>}", $dest );
+      return;
+    }
     if( !exists( $heap->{ "karma" } ) ) {
       if( -e "karma.yaml" ) {
         $heap->{ "karma" } = LoadFile( "karma.yaml" );