From d7e3e8b992d6c01a713d13ccbb9a48b59a0872c5 Mon Sep 17 00:00:00 2001 From: pdbogen Date: Wed, 3 Sep 2008 19:29:26 +0000 Subject: [PATCH] SHORTEN: More reliable; add usage git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@58 088b83a4-0077-4247-935c-42ec02c2848b --- commands.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"; } -- 2.11.0