projects
/
twirssi-net-twitter-lite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in binmode. Also, try to make sure the last_poll id never decreases
[twirssi-net-twitter-lite.git]
/
twirssi.pl
diff --git
a/twirssi.pl
b/twirssi.pl
index 356660fdbbb793d46cf95302940d70ee54a170f2..aca557c52b0f5c426f4030b9ae2991abc4e739bd 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-12,7
+12,7
@@
$Data::Dumper::Indent = 1;
use vars qw($VERSION %IRSSI);
$VERSION = "2.2.5beta";
use vars qw($VERSION %IRSSI);
$VERSION = "2.2.5beta";
-my ($REV) = '$Rev: 6
7
7 $' =~ /(\d+)/;
+my ($REV) = '$Rev: 6
8
7 $' =~ /(\d+)/;
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
%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',
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://twirssi.com',
- changed => '$Date: 2009-0
7-22 13:58:05 -0700 (Wed, 22 Jul
2009) $',
+ changed => '$Date: 2009-0
8-07 01:24:53 -0700 (Fri, 07 Aug
2009) $',
);
my $window;
);
my $window;
@@
-1032,6
+1032,7
@@
sub monitor_child {
# pretend
if ( open FILE, $filename ) {
# pretend
if ( open FILE, $filename ) {
+ binmode FILE, ":utf8";
my @lines;
my %new_cache;
while (<FILE>) {
my @lines;
my %new_cache;
while (<FILE>) {
@@
-1162,8
+1163,16
@@
sub monitor_child {
}
if (/^-- (\d+)$/) {
}
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;
}
my ( $f, $t ) = split ' ', $_;
$nicks{$f} = $friends{$f} = $t;