X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/2931223071f48e8a92e9a2353694ef534a44d295..a142f72e884f598257ace2c62419ddec5f3ed7d0:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 1f0f895..aca557c 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -1032,7 +1032,7 @@ sub monitor_child { # pretend if ( open FILE, $filename ) { - bindmode FILE, ":utf8"; + binmode FILE, ":utf8"; my @lines; my %new_cache; while () { @@ -1163,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;