X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/4edf2cd46af41132f0235069bb4c03b09c1a24ca..56c006f8cde9376106ad6608750e7eadda96ac44:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 331715c..48b0108 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -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)");