]> git.mmlx.us Git - destult.git/commitdiff
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 1059a4a66c19c5d3baa07f7591161af54e5d2d64..e43884be2a903dfaefe3f89536d47197cf3e5e18 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" );