From: Dirk Koopman Date: Mon, 2 Jul 2007 17:05:46 +0000 (+0100) Subject: add iso and filter info to links command. X-Git-Tag: 1.55~116 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f35f0015904ecac74bd6e2ecf9cac79df0c00aaf;p=spider.git add iso and filter info to links command. --- diff --git a/Changes b/Changes index bfb0b248..790a2b73 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ 1. Add a new command to show the contents of the cmd_cache. This allows those people whom develop their own commands to see which version they are using. It is called show/cmd_cache (or sh/cmd for short). +2. Add some extra info to the links command. Show whether a link is isolated +and also whether it has filters (if applicable) and whether these are +personalised ('Y') or the default node_filter ('D'). 29Jun07======================================================================= 1. If a node is set/isolated then make sure that a) pc9x is not advertised and b) pc9x is ignored. diff --git a/cmd/links.pl b/cmd/links.pl index 207bf7a7..cfae3b36 100644 --- a/cmd/links.pl +++ b/cmd/links.pl @@ -15,8 +15,8 @@ my $dxchan; my @out; my $nowt = time; -push @out, " Ave Obs Ping Sec Since"; -push @out, " Callsign Type Started RTT count Int. Last Ping PC92"; +push @out, " Ave Obs Ping Next Filters"; +push @out, " Callsign Type Started RTT Count Int. Ping Iso? In Out PC92?"; foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { my $call = $dxchan->call(); @@ -25,9 +25,20 @@ foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { my $sort; my $name = $dxchan->user->name || " "; my $obscount = $dxchan->nopings; - my $lastt = $nowt - ($dxchan->lastping); + my $lastt = $dxchan->pingint - ($nowt - $dxchan->lastping); my $pingint = $dxchan->pingint; my $ping = $dxchan->is_node && $dxchan != $main::me ? sprintf("%8.2f",$dxchan->pingave) : ""; + my $iso = $dxchan->isolate ? 'Y' :' '; + my ($fin, $fout) = (' ', ' '); + unless ($dxchan->do_pc92) { + my $f; + if ($f = $dxchan->inroutefilter) { + $fin = $dxchan->inroutefilter =~ /node_default/ ? 'D' : 'Y'; + } + if ($f = $dxchan->routefilter) { + $fout = $dxchan->routefilter =~ /node_default/ ? 'D' : 'Y'; + } + } $sort = 'ANEA' if $dxchan->is_aranea; $sort = "DXSP" if $dxchan->is_spider; $sort = "CLX " if $dxchan->is_clx; @@ -35,7 +46,7 @@ foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { $sort = "AR-C" if $dxchan->is_arcluster; $sort = "AK1A" if $dxchan->is_ak1a; my $pc92 = $dxchan->do_pc9x ? 'Y' : ''; - push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $pc92", $call, $pingint, $lastt; + push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92", $call, $pingint, $lastt; } return (1, @out) diff --git a/perl/Version.pm b/perl/Version.pm index 9844f978..41948ab8 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '98'; +$build = '99'; 1;