r497 - When we create the twitter window, notify the user
[twirssi-net-twitter-lite.git] / twirssi.pl
index 0ee8ab107f96a7384b6a6e25f54447685434fb0d..23f9646b04a7f8d4f742672c9e9f17c3f6432c9e 100644 (file)
@@ -11,8 +11,8 @@ $Data::Dumper::Indent = 1;
 
 use vars qw($VERSION %IRSSI);
 
-$VERSION = "2.1.1beta";
-my ($REV) = '$Rev: 491 $' =~ /(\d+)/;
+$VERSION = "2.1.2beta";
+my ($REV) = '$Rev: 497 $' =~ /(\d+)/;
 %IRSSI = (
     authors     => 'Dan Boger',
     contact     => 'zigdon@gmail.com',
@@ -21,7 +21,7 @@ my ($REV) = '$Rev: 491 $' =~ /(\d+)/;
       . 'Can optionally set your bitlbee /away message to same',
     license => 'GNU GPL v2',
     url     => 'http://twirssi.com',
-    changed => '$Date: 2009-02-25 10:44:26 -0800 (Wed, 25 Feb 2009) $',
+    changed => '$Date: 2009-02-28 11:24:31 -0800 (Sat, 28 Feb 2009) $',
 );
 
 my $window;
@@ -546,7 +546,7 @@ sub cmd_upgrade {
     &notice("Downloading twirssi from $URL");
     LWP::Simple::getstore( $URL, "$loc.upgrade" );
 
-    unless ($data) {
+    unless ( $data or Irssi::settings_get_bool("twirssi_upgrade_beta") ) {
         unless ( open( NEW, "$loc.upgrade" ) ) {
             &notice(
 "Failed to read $loc.upgrade.  Check that /set twirssi_location is set to the correct location."
@@ -868,6 +868,10 @@ sub monitor_child {
             }
 
             if ( not $meta{type} or $meta{type} ne 'searchid' ) {
+                if ( exists $meta{id} and exists $new_cache{ $meta{id} } ) {
+                    next;
+                }
+
                 $new_cache{ $meta{id} } = time;
 
                 if ( exists $meta{id} and exists $tweet_cache{ $meta{id} } ) {
@@ -1211,6 +1215,10 @@ Irssi::settings_add_bool( "twirssi", "tweet_window_input",        0 );
 $last_poll = time - &get_poll_time;
 $window = Irssi::window_find_name( Irssi::settings_get_str('twitter_window') );
 if ( !$window ) {
+    Irssi::active_win()
+      ->print( "Couldn't find a window named '"
+          . Irssi::settings_get_str('twitter_window')
+          . "', trying to create it." );
     $window =
       Irssi::Windowitem::window_create(
         Irssi::settings_get_str('twitter_window'), 1 );