# and subsequently plagerized by K1XX.
#
# 16-Jun-2000
-# $Id$
+#
#
my $self = shift;
my $nowt = time;
push @out, " Ave Obs Ping Next Filters";
-push @out, " Callsign Type Started RTT Count Int. Ping Iso? In Out PC92?";
+push @out, " Callsign Type Started RTT Count Int. Ping Iso? In Out PC92? Address";
foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) {
my $call = $dxchan->call();
my $sort;
my $name = $dxchan->user->name || " ";
my $obscount = $dxchan->nopings;
- my $lastt = $dxchan->pingint - ($nowt - $dxchan->lastping);
my $pingint = $dxchan->pingint;
+ my $lastt = $dxchan->lastping ? ($dxchan->pingint - ($nowt - $dxchan->lastping)) : $pingint;
my $ping = $dxchan->is_node && $dxchan != $main::me ? sprintf("%8.2f",$dxchan->pingave) : "";
my $iso = $dxchan->isolate ? 'Y' :' ';
my ($fin, $fout, $pc92) = (' ', ' ', ' ');
$fout = $dxchan->routefilter =~ /node_default/ ? 'D' : 'Y';
}
}
+ unless ($pingint) {
+ $lastt = 0;
+ $ping = " ";
+ }
+
$sort = 'ANEA' if $dxchan->is_aranea;
$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;
- push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92", $call, $pingint, $lastt;
+ my $ipaddr;
+
+ if ($dxchan->conn->peerhost) {
+ my $addr = $dxchan->conn->peerhost;
+ $ipaddr = $addr if is_ipaddr($addr);
+ $ipaddr = 'local' if $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/;
+ }
+ $ipaddr = 'ax25' if $dxchan->conn->ax25;
+
+ push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92 $ipaddr", $call, $pingint, $lastt;
}
return (1, @out)