fixed RTT in who
[spider.git] / cmd / who.pl
1 #
2 # who : is online
3 # a complete list of stations connected
4 #
5 # Copyright (c) 1999 Dirk Koopman G1TLH
6 #
7 # $Id$
8
9
10 my $self = shift;
11 my $dxchan;
12 my @out;
13
14 push @out, "  Callsign Type Started           Name                Ave RTT";
15
16 foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
17     my $call = $dxchan->call();
18         my $t = cldatetime($dxchan->startt);
19         my $sort = $dxchan->is_node ? "NODE" : "USER";
20         my $name = $dxchan->user->name || " ";
21         my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%8.2f", $dxchan->pingave) : "";
22         push @out, sprintf "%10s $sort $t %-18.18s $ping", $call, $name;
23 }
24
25 return (1, @out)