Added node type to links and who
[spider.git] / cmd / who.pl
index c5d665d0554411ad2fbc4e28f35b066aa3abd5d1..8bd69e80a5e5599f1da118f595ce5f71e9f00c15 100644 (file)
@@ -11,15 +11,23 @@ my $self = shift;
 my $dxchan;
 my @out;
 
-push @out, "  Callsign Type Started           Name                Ave RTT";
+push @out, "  Callsign Type      Started           Name                Ave RTT";
 
 foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
     my $call = $dxchan->call();
        my $t = cldatetime($dxchan->startt);
-       my $sort = $dxchan->is_node ? "NODE" : "USER";
+       my $type = $dxchan->is_node ? "NODE" : "USER";
+       my $sort = "    ";
+       if ($dxchan->is_node) {
+               $sort = "DXSP" if $dxchan->is_spider;
+               $sort = "CLX " if $dxchan->is_clx;
+               $sort = "DXNT" if $dxchan->is_dxnet;
+               $sort = "AR-C" if $dxchan->is_arcluster;
+               $sort = "AK1A" if $dxchan->is_ak1a;
+       }
        my $name = $dxchan->user->name || " ";
        my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%8.2f", $dxchan->pingave) : "";
-       push @out, sprintf "%10s $sort $t %-18.18s $ping", $call, $name;
+       push @out, sprintf "%10s $type $sort $t %-18.18s $ping", $call, $name;
 }
 
 return (1, @out)