projects
/
twirssi-net-twitter-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de28498
)
$VERSION = "1.1"; - r303 - Make sure we keep the cache of nicks up to date
author
Dan Boger
<zigdon@irc.peeron.com>
Thu, 8 Jan 2009 20:43:53 +0000
(12:43 -0800)
committer
Dan Boger
<zigdon@irc.peeron.com>
Thu, 8 Jan 2009 20:43:53 +0000
(12:43 -0800)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index ccba42575b0790724ddbb2e9de6bf78ad07a9e56..76892c37d0ab8e07218afd16d254548b23136d5a 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-10,7
+10,7
@@
use vars qw($VERSION %IRSSI);
use constant { DEBUG => 0 };
$VERSION = "1.1";
use constant { DEBUG => 0 };
$VERSION = "1.1";
-my ($REV) = '$Rev: 30
2
$' =~ /(\d+)/;
+my ($REV) = '$Rev: 30
3
$' =~ /(\d+)/;
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
@@
-150,6
+150,7
@@
sub cmd_login {
¬ice("Logged in as $user, loading friends list...");
&load_friends;
¬ice( "loaded friends: ", scalar keys %nicks );
¬ice("Logged in as $user, loading friends list...");
&load_friends;
¬ice( "loaded friends: ", scalar keys %nicks );
+ %nicks = %friends;
$nicks{$user} = 0;
&get_updates;
} else {
$nicks{$user} = 0;
&get_updates;
} else {
@@
-163,7
+164,7
@@
sub load_friends {
while (1) {
my $friends = $twit->friends( { page => $page } );
last unless $friends;
while (1) {
my $friends = $twit->friends( { page => $page } );
last unless $friends;
- $new_friends{ $_->{screen_name} } =
$nicks{ $_->{screen_name} } =
time
+ $new_friends{ $_->{screen_name} } = time
foreach @$friends;
$page++;
last if @$friends == 0 or $page == 10;
foreach @$friends;
$page++;
last if @$friends == 0 or $page == 10;
@@
-295,7
+296,7
@@
sub monitor_child {
last;
}
my ($f, $t) = split ' ', $_;
last;
}
my ($f, $t) = split ' ', $_;
- $friends{$f} = $t;
+ $
nicks{$f} = $
friends{$f} = $t;
}
print "new last_poll = $last_poll" if DEBUG;
}
print "new last_poll = $last_poll" if DEBUG;