Mercurial > hg > skillbot
changeset 55:c5ce2fff9b85
Update friends as they're added, not on channel join
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sun, 28 Dec 2008 12:11:28 +0000 |
parents | 9ed1e53a8d3e |
children | c604d8d6ccc5 |
files | skillbot.pl |
diffstat | 1 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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++; }