# HG changeset patch # User Dominic Cleal # Date 1230466288 0 # Node ID c5ce2fff9b8546888b73f2a47c84463e32154dd1 # Parent 9ed1e53a8d3ea33226d886e778704c763c109270 Update friends as they're added, not on channel join diff -r 9ed1e53a8d3e -r c5ce2fff9b85 skillbot.pl --- a/skillbot.pl Sat Dec 27 23:45:55 2008 +0000 +++ b/skillbot.pl Sun Dec 28 12:11:28 2008 +0000 @@ -180,15 +180,8 @@ my ($self, $event) = @_; # print Dumper($event); - if ($event->nick eq $config{nick}) { -=pod - $twit->update("In channel, checking for tweets"); - $twit->http_code == 200 or print sprintf("%s| *** %s\n", scalar gmtime(), $twit->http_message); -=cut - - # Now we're in, check for tweets as a one-off - add_one_shot_timer(10, sub { my ($timer, $self) = @_; check_training($self); }); - } +# if ($event->nick eq $config{nick}) { +# } } sub on_ping @@ -442,12 +435,14 @@ my $loaded = 0; foreach my $character ($api->characters) { next if defined $c && $c ne $character->name; - push @friends, { + my $f = { char => $character, api => $api, nick => $nick, tz => $tz }; + push @friends, $f; + check_friend($self, $f); $loaded++; }