X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/eacc4ee953f3eb9f16b1471bba19adbaac0dc7e3..a142f72e884f598257ace2c62419ddec5f3ed7d0:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 356660f..aca557c 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -12,7 +12,7 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); $VERSION = "2.2.5beta"; -my ($REV) = '$Rev: 677 $' =~ /(\d+)/; +my ($REV) = '$Rev: 687 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', contact => 'zigdon@gmail.com', @@ -21,7 +21,7 @@ my ($REV) = '$Rev: 677 $' =~ /(\d+)/; . 'Can optionally set your bitlbee /away message to same', license => 'GNU GPL v2', url => 'http://twirssi.com', - changed => '$Date: 2009-07-22 13:58:05 -0700 (Wed, 22 Jul 2009) $', + changed => '$Date: 2009-08-07 01:24:53 -0700 (Fri, 07 Aug 2009) $', ); my $window; @@ -1032,6 +1032,7 @@ sub monitor_child { # pretend if ( open FILE, $filename ) { + binmode FILE, ":utf8"; my @lines; my %new_cache; while () { @@ -1162,8 +1163,16 @@ sub monitor_child { } if (/^-- (\d+)$/) { - ($new_last_poll) = ($1); - last; + $new_last_poll = $1; + if ( $new_last_poll >= $last_poll ) { + last; + } else { + print "Impossible! ", + "new_last_poll=$new_last_poll < last_poll=$last_poll!" + if &debug; + undef $new_last_poll; + next; + } } my ( $f, $t ) = split ' ', $_; $nicks{$f} = $friends{$f} = $t;