add iso and filter info to links command.
authorDirk Koopman <djk@tobit.co.uk>
Mon, 2 Jul 2007 17:05:46 +0000 (18:05 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 2 Jul 2007 17:05:46 +0000 (18:05 +0100)
Changes
cmd/links.pl
perl/Version.pm

diff --git a/Changes b/Changes
index bfb0b248479af4c926473e5a7d2e41853c131040..790a2b73902b8baabe2305afbd48416f4051b096 100644 (file)
--- 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.
index 207bf7a7155609a083afcdedeed20b4f3f6d81ec..cfae3b365f6bc9488c743cb02cd9e18cc25e728a 100644 (file)
@@ -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)
index 9844f97822882d819f02b2d585384b1fedd4b8ef..41948ab89a5c7a348eb4a86317681749dd8dc88b 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.54';
 $subversion = '0';
-$build = '98';
+$build = '99';
 
 1;