From 4b6615e5529cc1b441426817dab72f2b4308d046 Mon Sep 17 00:00:00 2001 From: Dan Boger Date: Mon, 31 Aug 2009 11:51:14 -0700 Subject: [PATCH] Update /twirssi_version to show the version of the installed Net::Identica, if it's loaded --- twirssi.pl | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/twirssi.pl b/twirssi.pl index 2c9c787..1263893 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -11,7 +11,7 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); -$VERSION = "2.2.5"; +$VERSION = "2.2.6beta"; my ($REV) = '$Rev: 687 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', @@ -504,7 +504,9 @@ sub cmd_login { return; } - if ( my $timeout = Irssi::settings_get_int("twitter_timeout") and $twit->can('ua')) { + if ( my $timeout = Irssi::settings_get_int("twitter_timeout") + and $twit->can('ua') ) + { $twit->ua->timeout($timeout); } @@ -1520,7 +1522,7 @@ Irssi::settings_add_str( "twirssi", "twirssi_replies_store", ".irssi/scripts/twirssi.json" ); Irssi::settings_add_int( "twirssi", "twitter_friends_poll", 600 ); -Irssi::settings_add_int( "twirssi", "twitter_timeout", 30 ); +Irssi::settings_add_int( "twirssi", "twitter_timeout", 30 ); Irssi::settings_add_bool( "twirssi", "twirssi_upgrade_beta", 0 ); Irssi::settings_add_bool( "twirssi", "tweet_to_away", 0 ); @@ -1592,11 +1594,22 @@ if ($window) { Irssi::command_bind( "twirssi_version", sub { - ¬ice("Twirssi v$VERSION (r$REV); " - . "Net::Twitter v$Net::Twitter::VERSION. " + ¬ice( + "Twirssi v$VERSION (r$REV); " + . ( + $Net::Twitter::VERSION + ? "Net::Twitter v$Net::Twitter::VERSION. " + : "" + ) + . ( + $Net::Identica::VERSION + ? "Net::Identica v$Net::Identica::VERSION. " + : "" + ) . "JSON in use: " . JSON::Any::handler() - . ". See details at http://twirssi.com/" ); + . ". See details at http://twirssi.com/" + ); } ); Irssi::command_bind( -- 2.39.5