X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/4edf2cd46af41132f0235069bb4c03b09c1a24ca..ed4dc7bc324f52c0d89f2c9040b4a410d5571ec0:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 331715c..2c9c787 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -11,7 +11,7 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); -$VERSION = "2.2.5beta"; +$VERSION = "2.2.5"; my ($REV) = '$Rev: 687 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', @@ -504,7 +504,7 @@ sub cmd_login { return; } - if ( my $timeout = Irssi::settings_get_int("twitter_timeout") ) { + if ( my $timeout = Irssi::settings_get_int("twitter_timeout") and $twit->can('ua')) { $twit->ua->timeout($timeout); } @@ -1623,6 +1623,22 @@ if ($window) { sub { ¬ice("Device updated to $_[0]"); } ) ); + Irssi::command_bind( + "twitter_block", + &gen_cmd( + "/twitter_block ", + "create_block", + sub { ¬ice("Blocked $_[0]"); } + ) + ); + Irssi::command_bind( + "twitter_unblock", + &gen_cmd( + "/twitter_unblock ", + "destroy_block", + sub { ¬ice("Unblock $_[0]"); } + ) + ); Irssi::signal_add_last( 'complete word' => \&sig_complete ); ¬ice(" %Y<%C(%B^%C)%N TWIRSSI v%R$VERSION%N (r$REV)");