Fix a bug in TINYURL, and fix indenting in CONFIG.
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Mon, 25 Aug 2008 13:42:57 +0000 (13:42 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Mon, 25 Aug 2008 13:42:57 +0000 (13:42 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@51 088b83a4-0077-4247-935c-42ec02c2848b

commands.yaml

index b367e89..018a4cd 100644 (file)
@@ -309,7 +309,7 @@ CONFIG: |-
   sub {
     my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
     my( $subj, $predicate ) = split( / /, $what, 2 );
-      if( $predicate ) {
+    if( $predicate ) {
       $Destult::config{ uc( $subj ) } = $predicate;
       DumpFile( "config.yaml", \%Destult::config );
       $kernel->post( $src, $replypath, "Okay, $who.", $dest );
@@ -1486,7 +1486,7 @@ TINYURL: |-
       $kernel->post( $src, $replypath, $arr[2]." [first: ".$arr[0]."/".$arr[1]."]", $dest );
     } else {
       my $url = makeashorterlink( $what ) or return;
-      $heap->{ 'urls' }->{ uc( $what ) } = [ $who, $dest->{ 'text' }, $url ];
+      $heap->{ 'urls' }->{ uc( $what ) } = [ $who, $dest->{ 'dest' }, $url ];
       $kernel->post( $src, $replypath, "$url [$who]", $dest );
     }
   }