Switch SnipURL default to TinyURL.. SnipURL changed their API and the module isn...
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Thu, 27 Aug 2009 17:55:52 +0000 (17:55 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Thu, 27 Aug 2009 17:55:52 +0000 (17:55 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@104 088b83a4-0077-4247-935c-42ec02c2848b

commands.yaml

index c7daa59..eceac67 100644 (file)
@@ -898,7 +898,7 @@ TRANSLATE: |-
 
 RSS: |-
   sub {
-    use WWW::Shorten 'SnipURL';
+    use WWW::Shorten::TinyURL;
     use XML::RSS;
     use Time::CTime;
   
@@ -1664,7 +1664,7 @@ SHORTEN: |-
     my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
     my( $service, $url ) = split( / /, $what, 2 );
     if( !defined( $service ) ) {
-      $kernel->post( $src, $replypath, "USAGE: SHORTEN [<service>] <URL>, where <service> 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 );
+      $kernel->post( $src, $replypath, "USAGE: SHORTEN [<service>] <URL>, where <service> is one of (potentially) BabyURL, Linkz, MakeAShorterLink, Metamark, NotLong, OneShortLink, Shorl, TinyClick, TinyLink, or TinyURL*. (* designates the default service.) Many of these do not work.", $dest );
       return;
     }
     if( !defined( $url ) ) {
@@ -1881,11 +1881,7 @@ TITLE: |-
     if( $what =~ /^https?:\/\/(snipurl|tinyurl)\.com\/.*/i ) {
       $short = $what;
     } else {
-      use WWW::Shorten::SnipURL;
-      $short = makeashorterlink( $what );
-      if( !$short ) {
-        use WWW::Shorten::TinyURL;
-      }
+      use WWW::Shorten::TinyURL;
       $short = makeashorterlink( $what );
       if( !$short ) {
         $short = $what;