1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | our $UPDATE_LOGINS = Event->idle (repeat => 0, min => 1, data => cf::WF_AUTOCANCEL, cb => sub { |
3 | our $UPDATE_LOGINS = Event->idle (repeat => 0, min => 1, data => cf::WF_AUTOCANCEL, cb => Coro::unblock_sub { |
4 | my ($status, @pl) = ext::commands::who_listing; |
4 | my ($status, @pl) = ext::commands::who_listing; |
5 | |
5 | |
|
|
6 | #TODO: write files asynchronously |
6 | open my $fh, ">", cf::localdir . "/usercount"; |
7 | open my $fh, ">", cf::localdir . "/usercount"; |
7 | print $fh scalar @pl; |
8 | print $fh scalar @pl; |
8 | |
9 | |
9 | open my $fh, ">", cf::localdir . "/userlisting.html"; |
10 | open my $fh, ">", cf::localdir . "/userlisting.html"; |
10 | for ($status, @pl) { |
11 | for ($status, @pl) { |