harden hop count decrementing.
authorDirk Koopman <djk@post.tobit.co.uk>
Fri, 20 Jul 2007 14:50:14 +0000 (15:50 +0100)
committerDirk Koopman <djk@post.tobit.co.uk>
Fri, 20 Jul 2007 14:50:14 +0000 (15:50 +0100)
add better links command

.gitignore
cmd/links.pl
data/.gitignore
perl/DXProt.pm
perl/Version.pm

index 1ca43b05150b0d915da95ebafa9aa20714b017c0..ae974f3daf186b0174a84eefac4d3cad76503acc 100644 (file)
@@ -1,6 +1,10 @@
 local*
 *~
 *.[oa]
+*.oo
+*.ooo
+*.oooo
+*.ooooo
 *.tmp
 CVS
 tmp
@@ -14,3 +18,5 @@ tmp
 packclus
 tutor*
 db
+core
+a.out
index df4476c0dcda1c48a9fd04b883ebf62c6a691602..4bad6285a060bedddfa63d7120c6ef9857167585 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";
+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,16 +25,29 @@ 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, $pc92) = (' ', ' ', ' ');
+       if ($dxchan->do_pc9x) {
+               $pc92 = 'Y';
+       } else {
+               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;
        $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", $call, $pingint, $lastt;
+       push @out, sprintf "%10s $sort $t$ping   $obscount  %5d %5d  $iso    $fin   $fout   $pc92", $call, $pingint, $lastt;
 }
 
 return (1, @out)
index 6027afdc080beced87fd5ec9aacecb27fbf58583..676742e348e47c13b10392b10e428f944c2b4e3f 100644 (file)
@@ -11,3 +11,5 @@ wcy
 motd*
 issue
 logout
+connected
+hoptable.pl
index 360bb2dd2392c602e788a42e77edee9b0411f4aa..18ecf1297956402ff15ee177a5d8fe08001178f9 100644 (file)
@@ -2164,13 +2164,14 @@ sub adjust_hops
                        return "" if defined $newhops && $newhops == 0;
                        $newhops = $ref->{default} unless $newhops;
                        return "" if defined $newhops && $newhops == 0;
-                       $newhops = $hops if !$newhops;
+                       $newhops = $hops unless $newhops;
+                       return "" unless $newhops > 0;
                        $s =~ s/\^H(\d+)(\^~?)$/\^H$newhops$2/ if $newhops;
                } else {
                        # simply decrement it
                        $hops--;
-                       return "" if !$hops;
-                       $s =~ s/\^H(\d+)(\^~?)$/\^H$hops$2/ if $hops;
+                       return "" unless $hops > 0;
+                       $s =~ s/\^H(\d+)(\^~?)$/\^H$hops$2/;
                }
        }
        return $s;
index dac731e1599087dc98b435c00f0563b8006a54dc..dff014c333a6122d3d3fbd5a5c4ec331820f37a8 100644 (file)
@@ -9,7 +9,7 @@ package main;
 
 use vars qw($version $build);
 
-$version = '1.53';
-$build = '16';
+$version = '';
+$build = '1';
 
 1;