DumpFile( "memos.yaml", $heap->{ 'memo' } );
$kernel->post( $src, $replypath, "Memo left for $rec.", $dest );
}
+
+TINYURL: |-
+ sub {
+ use WWW::Shorten::TinyURL;
+ my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
+ if( !exists( $heap->{ 'urls' } ) ) {
+ $heap->{ 'urls' } = {};
+ }
+ if( exists( $heap->{ 'urls' }->{ uc( $what ) } ) ) {
+ my @arr = @{ $heap->{ 'urls' }->{ uc( $what ) } };
+ $kernel->post( $src, $replypath, $arr[2]." [first: ".$arr[0]."/".$arr[1]."]", $dest );
+ } else {
+ my $url = makeashorterlink( $what );
+ $heap->{ 'urls' }->{ uc( $what ) } = [ $who, $dest, $url ];
+ $kernel->post( $src, $replypath, "$url [$who]", $dest );
+ }
+ }