]> dxcluster.org Git - spider.git/commitdiff
added a load of eph changes
authorminima <minima>
Sat, 9 Jun 2001 16:03:27 +0000 (16:03 +0000)
committerminima <minima>
Sat, 9 Jun 2001 16:03:27 +0000 (16:03 +0000)
cmd/forward/opername.pl
cmd/set/here.pl
cmd/set/homenode.pl
cmd/set/location.pl
cmd/set/name.pl
cmd/set/qra.pl
cmd/set/qth.pl
cmd/unset/here.pl
perl/DXProt.pm

index 314a9e37b0b5d54e24fa3f334ba94d98736a3dcb..57af6505da02019d36283fed1d12fd8b2556cb5a 100644 (file)
@@ -30,10 +30,26 @@ foreach $call (@f) {
                my $long = $ref->long;
                my $node = $ref->homenode;
                my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
-               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
-               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
-               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
-               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
+               if ($name) {
+                       my $l = DXProt::pc41($call, 1, $name);
+                       DXProt::eph_dup($l);
+                       DXProt::broadcast_all_ak1a($l, $DXProt::me) ;
+               }
+               if ($qth) {
+                       my $l = DXProt::pc41($call, 2, $qth);
+                       DXProt::eph_dup($l);
+                       DXProt::broadcast_all_ak1a($l, $DXProt::me) ;
+               }
+               if ($latlong) {
+                       my $l = DXProt::pc41($call, 3, $latlong);
+                       DXProt::eph_dup($l);
+                       DXProt::broadcast_all_ak1a($l, $DXProt::me) ;
+               }
+               if ($node) {
+                       my $l = DXProt::pc41($call, 4, $node);
+                       DXProt::eph_dup($l);
+                       DXProt::broadcast_all_ak1a($l, $DXProt::me) ;
+               }
        }
 }
 
index e3d56f3ea30c2410b0f8e544aaa39be0d71915b1..8d5665c94366dd5497cc41245404f349377f1f7a 100644 (file)
@@ -21,10 +21,14 @@ foreach $call (@args) {
                $dxchan->here(1);
                push @out, $self->msg('heres', $call);
                if ($ref) {
-                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       my $s = DXProt::pc24($ref);
+                       DXProt::eph_dup($s);
+                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                        $ref->here(1);
                } elsif ($ref = Route::Node::get($call)) {
-                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       my $s = DXProt::pc24($ref);
+                       DXProt::eph_dup($s);
+                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                        $ref->here(1);
                } else {
                        $ref = Route::Node::get($call);
index 5d3cb413610f38177d8b09fb00d371aaec44fcad..cf8d97154d60a0316359452bd061c0b65554380a 100644 (file)
@@ -22,7 +22,9 @@ if ($user) {
        $line = uc $line;
        $user->homenode($line);
        $user->put();
-       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $line), $DXProt::me);
+       my $s = DXProt::pc41($call, 4, $line);
+       DXProt::eph_dup($s);
+       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
        return (1, $self->msg('hnode', $line));
 } else {
        return (1, $self->msg('namee2', $call));
index 8d1f135073264b5e44290eb7ce2e7696192a0247..25db6ba609259c4c3f2f803f4edfe7decd4ca4a4 100644 (file)
@@ -24,7 +24,9 @@ if ($user) {
        my ($lat, $long) = DXBearing::stoll($line);
        $user->lat($lat);
        $user->long($long);
-       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
+       my $s = DXProt::pc41($call, 3, $line);
+       DXProt::eph_dup($s);
+       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
        unless ($user->qra && DXBearing::is_qra($user->qra) ) {
                my $qra = DXBearing::lltoqra($lat, $long);
                $user->qra($qra);
index 6f76ea60eec7258be7df277fb92cf5e4a1d9071d..3291757455974a77f209057463d7a199b2459a36 100644 (file)
@@ -21,7 +21,9 @@ $user = DXUser->get_current($call);
 if ($user) {
        $user->name($line);
        $user->put();
-       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $line), $DXProt::me);
+       my $s = DXProt::pc41($call, 1, $line);
+       DXProt::eph_dup($s);
+       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
        return (1, $self->msg('name', $line));
 } else {
        return (1, $self->msg('namee2', $call));
index 1bdc1cecce5adfe3cf535129f41982a032e50750..484666ca953efa3e638fdd077417f459823676b5 100644 (file)
@@ -26,7 +26,9 @@ if ($user) {
                $user->lat($lat);
                $user->long($long);
                my $s = DXBearing::lltos($lat, $long);
-               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me);
+               my $l = DXProt::pc41($call, 3, $s);
+               DXProt::eph_dup($l);
+               DXProt::broadcast_all_ak1a($l, $DXProt::me) ;
        }
        
        $user->put();
index 567208c731362974382d1fbe573b28880c2a8ea9..2b696f94c29d05064ca9f4ce90646bd94a43a405 100644 (file)
@@ -21,7 +21,9 @@ $user = DXUser->get_current($call);
 if ($user) {
        $user->qth($line);
        $user->put();
-       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me);
+       my $s = DXProt::pc41($call, 2, $line);
+       DXProt::eph_dup($s);
+       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
        return (1, $self->msg('qth', $line));
 } else {
        return (1, $self->msg('namee2', $call));
index 63a32162b4adab4dda170eddbcc7478cb5684e42..c1c7b0f73ed4e062f9396cfaa60af2ec324b74da 100644 (file)
@@ -21,10 +21,14 @@ foreach $call (@args) {
                $dxchan->here(0);
                push @out, $self->msg('hereu', $call);
                if ($ref) {
-                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       my $s = DXProt::pc24($ref);
+                       DXProt::eph_dup($s);
+                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                        $ref->here(0);
                } elsif ($ref = Route::Node::get($call)) {
-                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       my $s = DXProt::pc24($ref);
+                       DXProt::eph_dup($s);
+                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                        $ref->here(0);
                } else {
                        $ref = Route::Node::get($call);
index dbe7faf8e7f63340b3ee4ef262e8ea7505ed6380..a317fce269776f8094df0e6f01db40274b0e1b58 100644 (file)
@@ -35,7 +35,7 @@ use Route::Node;
 
 use strict;
 use vars qw($me $pc11_max_age $pc23_max_age
-                       $last_hour $last10 %emph  %pings %rcmds
+                       $last_hour $last10 %eph  %pings %rcmds
                        %nodehops $baddx $badspotter $badnode $censorpc
                        $allowzero $decode_dk0wcy $send_opernam @checklist);
 
@@ -1072,7 +1072,7 @@ sub normal
        #        REBROADCAST!!!!
        #
 
-       if (emph_dup($line)) {
+       if (eph_dup($line)) {
                dbg('chan', "PCPROT: Ephemeral dup, dropped");
        } else {
                unless ($self->{isolate}) {
@@ -1116,9 +1116,9 @@ sub process
 
        # every ten seconds
        if ($t - $last10 >= 10) {       
-               # clean out emphemera 
+               # clean out ephemera 
 
-               emph_clean();
+               eph_clean();
 
                $last10 = $t;
        }
@@ -1756,24 +1756,24 @@ sub route_pc21
        broadcast_route($self, \&pc21, scalar @_, @_);
 }
 
-sub emph_dup
+sub eph_dup
 {
        my $s = shift;
 
        # chop the end off
        $s =~ s/\^H\d\d?\^?~?@//;
-       return 1 if exists $emph{$s};
-       $emph{$s} = $main::systime;
+       return 1 if exists $eph{$s};
+       $eph{$s} = $main::systime;
        return undef;
 }
 
-sub emph_clean
+sub eph_clean
 {
        my ($key, $val);
        
-       while (($key, $val) = each %emph) {
+       while (($key, $val) = each %eph) {
                if ($main::systime - $val > 90) {
-                       delete $emph{$key};
+                       delete $eph{$key};
                }
        }
 }