]> git.sommitrealweird.co.uk Git - twirssi-net-twitter-lite.git/commitdiff
Make sure N:T has the ua method before calling it
authorDan Boger <zigdon@irc.peeron.com>
Wed, 19 Aug 2009 17:20:09 +0000 (10:20 -0700)
committerDan Boger <zigdon@irc.peeron.com>
Wed, 19 Aug 2009 17:20:09 +0000 (10:20 -0700)
twirssi.pl

index 331715ce03737fbfe13a9606df4d34fc16799292..1adc3179dd515ca64b7c4e966e6c14cd62d3926e 100644 (file)
@@ -504,7 +504,7 @@ sub cmd_login {
         return;
     }
 
         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);
     }
 
         $twit->ua->timeout($timeout);
     }