use File::Temp;
use LWP::Simple;
use Data::Dumper;
-use Net::Twitter;
+use Net::Identica;
$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',
. '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;
$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;
+ };
+ }
}
}
%friends = %nicks = ();
- $twit = Net::Twitter->new(
+ $twit = Net::Identica->new(
username => $user,
password => $pass,
source => "twirssi"
my ( $data, $server, $win ) = @_;
unless ( $twit and $twit->can('search') ) {
- ¬ice("ERROR: Your version of Net::Twitter ($Net::Twitter::VERSION) "
+ ¬ice("ERROR: Your version of Net::Identica ($Net::Identica::VERSION) "
. "doesn't support searches." );
return;
}
my ( $data, $server, $win ) = @_;
unless ( $twit and $twit->can('search') ) {
- ¬ice("ERROR: Your version of Net::Twitter ($Net::Twitter::VERSION) "
+ ¬ice("ERROR: Your version of Net::Identica ($Net::Identica::VERSION) "
. "doesn't support searches." );
return;
}
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; };
"twirssi_version",
sub {
¬ice("Twirssi v$VERSION (r$REV); "
- . "Net::Twitter v$Net::Twitter::VERSION. "
+ . "Net::Identica v$Net::Identica::VERSION. "
. "JSON in use: "
. JSON::Any::handler()
. ". See details at http://twirssi.com/" );