]> dxcluster.net Git - spider.git/commitdiff
fix set/seeme SSID, set rbn minspottime = 3mins
authorDirk Koopman <djk@tobit.co.uk>
Mon, 31 Jan 2022 18:27:02 +0000 (18:27 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 31 Jan 2022 18:27:02 +0000 (18:27 +0000)
Changes
perl/RBN.pm

diff --git a/Changes b/Changes
index f44a0b651440c577d13e5c0066505bc2c0491bd2..0f3234a35e491cac961b0f582bccb22d638d92cb 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,11 @@
+31Jan22=======================================================================
+1. Set $RBN::respottime to 3 minutes. NOTE change of name from 
+   $RBN::minspottime.
+2. Allow callsigns connected to a node with an SSID to get SEEME RBN spots
+   for their base callsigns. So G1TLH-2, G1TLH-7 will get **SEEME** RBN spots
+   if G1TLH is spotted on the RBN system - even is are both connected to the
+   node and G1TLH is not. Each call is unique and each callsign (variation) 
+   must have done a set/seeme + set/skimmer. .
 29Jan22=======================================================================
 1. Implement RBN set/seeme which displays any passing RBN spots for your
    callsign in "raw" format. 
index 3a906dbe7e0b5b5d816f83d59b85b93097245211..9d17d33bddfd597bf6318f0e1b2ec263d2f0cf8d 100644 (file)
@@ -75,7 +75,7 @@ our $startup_delay = 5*60;            # don't send anything out until this timer has expir
                                 # this is to allow the feed to "warm up" with duplicates
                                 # so that the "big rush" doesn't happen.
 
-our $respottime = 30*60;               # the time between respots of a callsign - if a call is
+our $respottime = 3*60;                # the time between respots of a callsign - if a call is
                                 # still being spotted (on the same freq) and it has been
                                 # spotted before, it's spotted again after this time
                                 # until the next respottime has passed.
@@ -347,24 +347,27 @@ sub normal
                #
                # But before we do anything, if this call is in the seeme hash then just send the spot to them
                #
-               if (exists $seeme{$call} && (my $scall = $seeme{basecall($call)})) {
-                       my $uchan = DXChannel::get($call);
-                       if ($uchan) {
-                               if ($uchan->is_user) {
-                                       if (isdbg('seeme')) {
-                                               dbg("seeme: $line");
-                                               dbg( qq{seemme:decode or:$origin qr:$qrg ca:$call mo:$mode s:$s m:$m sp:$spd u:$u sort:$sort t:$t tx:$tx qra:$qra});
+               if (exists $seeme{$call} && (my $ref = $seeme{$call})) {
+                       foreach my $rcall ( @$ref) {
+                               my $uchan = DXChannel::get($rcall);
+                               if ($uchan) {
+                                       if ($uchan->is_user) {
+                                               if (isdbg('seeme')) {
+                                                       dbg("seeme: $line");
+                                                       dbg( qq{seemme:decode or:$origin qr:$qrg ca:$call mo:$mode s:$s m:$m sp:$spd u:$u sort:$sort t:$t tx:$tx qra:$qra});
+                                               }
+                                               my @s =  Spot::prepare($qrg, $call, $utz, sprintf("%-3s %2ddB **SEEME**", $mode, $s), $origin.'-#');
+                                               my $buf = $uchan->format_dx_spot(@s);
+                                               dbg("seeme: result '$buf'") if isdbg('seeme');
+                                               $uchan->local_send('S', $buf);
+                                       } else {
+                                               LogDbg("RBN Someone is playing silly persons $rcall is not a user and cannot do 'seeme', ignored and reset");
+                                               del_seeme($rcall);
                                        }
-                                       my @s =  Spot::prepare($qrg, $call, $utz, sprintf("%-3s %2ddB **SEEME**", $mode, $s), $origin.'-#');
-                                       my $buf = $uchan->format_dx_spot(@s);
-                                       dbg("seeme: result '$buf'") if isdbg('seeme');
-                                       $uchan->local_send('S', $buf) if $scall;
-                               } else {
-                                       LogDbg("RBN Someone is playing silly persons $call is not a user and cannot do 'seeme', ignored and reset");
-                                       delete $seeme{$call};
                                }
                        }
                }
+               
                # find it?
                my $cand = $spots->{$sp};
                unless ($cand) {
@@ -451,7 +454,7 @@ sub send_dx_spot
        my $self = shift;
        my $quality = shift;
        my $cand = shift;
-
+       
        ++$self->{norbn};
        ++$self->{norbn10};
        ++$self->{norbnhour};
@@ -966,12 +969,24 @@ sub check_cache
 sub add_seeme
 {
        my $call = shift;
-       $seeme{basecall($call)} = 1;
+       my $base = basecall($call);
+       my $ref = $seeme{$base} || [];
+       push @$ref, $call unless grep $_ eq $call, @$ref;
+       $seeme{$base} = $ref;
 }
 
 sub del_seeme
 {
        my $call = shift;
-       delete $seeme{basecall($call)};
+       my $base = basecall($call);
+       my $ref = $seeme{$base};
+       return unless @$ref;
+       
+       @$ref =  grep {$_ ne $call} @$ref;
+       if (@$ref) {
+               $seeme{$base} = $ref;
+       } else {
+               delete $seeme{basecall($call)};
+       }
 }
 1;