From: pdbogen Date: Wed, 3 Sep 2008 19:29:26 +0000 (+0000) Subject: SHORTEN: More reliable; add usage X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=d7e3e8b992d6c01a713d13ccbb9a48b59a0872c5;p=destult.git SHORTEN: More reliable; add usage git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@58 088b83a4-0077-4247-935c-42ec02c2848b --- diff --git a/commands.yaml b/commands.yaml index ae49473..0bd9951 100644 --- a/commands.yaml +++ b/commands.yaml @@ -1480,7 +1480,11 @@ SHORTEN: |- sub { my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_; my( $service, $url ) = split( / /, $what, 2 ); - if( ! length $url ) { + if( !defined( $service ) ) { + $kernel->post( $src, $replypath, "USAGE: SHORTEN [] , where is one of (potentially) BabyURL, Linkz, MakeAShorterLink, Metamark, NotLong, OneShortLink, Shorl, SnipURL*, TinyClick, TinyLink, or TinyURL. (* designates the default service.) Many of these do not work.", $dest ); + return; + } + if( !defined( $url ) ) { $url = $service; $service = "SnipURL"; }