]> gb7djk.dxcluster.net Git - spider.git/blob - cmd/links.pl
make Storable optional again
[spider.git] / cmd / links.pl
1 #
2 # links : which are active
3 # a complete list of currently connected linked nodes
4 #
5 # Created by Iain Philipps G0RDI, based entirely on
6 # who.pl, which is Copyright (c) 1999 Dirk Koopman G1TLH
7 #
8 # 16-Jun-2000
9 # $Id: links.pl
10 #
11
12 my $self = shift;
13 my $dxchan;
14 my @out;
15
16 push @out, "  Callsign Type Started            Ave RTT";
17
18 foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) {
19         my $call = $dxchan->call();
20         my $t = cldatetime($dxchan->startt);
21         my $sort;
22         my $name = $dxchan->user->name || " ";
23         my $ping = $dxchan->is_node && $dxchan != $main::me ? sprintf("%8.2f",
24                                                                                                                                         $dxchan->pingave) : "";
25         $sort = "DXSP" if $dxchan->is_spider;
26         $sort = "CLX " if $dxchan->is_clx;
27         $sort = "DXNT" if $dxchan->is_dxnet;
28         $sort = "AR-C" if $dxchan->is_arcluster;
29         $sort = "AK1A" if $dxchan->is_ak1a;
30         push @out, sprintf "%10s $sort $t $ping", $call;
31 }
32
33 return (1, @out)
34
35
36
37