From: Dan Boger Date: Fri, 20 Feb 2009 22:38:15 +0000 (-0800) Subject: r483 - Remove block checking for /usr/bin/md5sum, as we never did use it. Only short... X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/commitdiff_plain/fabe4d576cf8b552863a1785426d90f978c133fb?ds=inline;hp=6e2d1f7b739136086662bb4b4fb1a6c5d75d2b8a r483 - Remove block checking for /usr/bin/md5sum, as we never did use it. Only shorten links in replies when we need to --- diff --git a/twirssi.pl b/twirssi.pl index fb99517..b5cfb2b 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -11,8 +11,8 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); -$VERSION = "2.0.5"; -my ($REV) = '$Rev: 481 $' =~ /(\d+)/; +$VERSION = "2.0.6"; +my ($REV) = '$Rev: 483 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', contact => 'zigdon@gmail.com', @@ -21,7 +21,7 @@ my ($REV) = '$Rev: 481 $' =~ /(\d+)/; . 'Can optionally set your bitlbee /away message to same', license => 'GNU GPL v2', url => 'http://twirssi.com', - changed => '$Date: 2009-02-19 14:22:45 -0800 (Thu, 19 Feb 2009) $', + changed => '$Date: 2009-02-20 14:37:28 -0800 (Fri, 20 Feb 2009) $', ); my $window; @@ -234,12 +234,14 @@ sub cmd_reply_as { $data = "\@$nick " . $data; } - if ( Irssi::settings_get_str("short_url_provider") ) { - foreach my $url ( $data =~ /(https?:\/\/\S+[\w\/])/g ) { - eval { - my $short = makeashorterlink($url); - $data =~ s/\Q$url/$short/g; - }; + if ( &too_long( $data, 1 ) ) { + if ( Irssi::settings_get_str("short_url_provider") ) { + foreach my $url ( $data =~ /(https?:\/\/\S+[\w\/])/g ) { + eval { + my $short = makeashorterlink($url); + $data =~ s/\Q$url/$short/g; + }; + } } } @@ -501,13 +503,6 @@ sub cmd_upgrade { return; } - if ( not -x "/usr/bin/md5sum" and not $data ) { - ¬ice( -"/usr/bin/md5sum can't be found - try '/twirssi_upgrade nomd5' to skip MD5 verification" - ); - return; - } - my $md5; unless ($data) { eval { use Digest::MD5; };