normalise spot dupe fields, normalise qrg by 25khz
[spider.git] / perl / RBN.pm
index 820f39cbb620d73cab33efaa54da2245edef0876..6924626f3d5b7486abab018c55ef4dcbc5a056fa 100644 (file)
@@ -202,11 +202,10 @@ sub start
        $self->{priv} = 0;
 
        # get the filters
-       my $nossid = $call;
-       $nossid =~ s/-\d+$//;
+#      $self->{inrbnfilter} = Filter::read_in('rbn', $call, 1) 
+#              || Filter::read_in('rbn', 'node_default', 1);
 
-       $self->{inrbnfilter} = Filter::read_in('rbn', $call, 1) 
-               || Filter::read_in('rbn', 'node_default', 1);
+       Filter::load_dxchan($self, 'rbn', 1);
        
        # clean up qra locators
        my $qra = $user->qra;
@@ -247,6 +246,15 @@ sub normal
 
        my (undef, undef, $origin, $qrg, $call, $mode, $s, $m, $spd, $u, $sort, $t, $tx) = split /[:\s]+/, $line;
 
+       # fix up "direct" (from a "skimmer server") connections
+       # basically the $mode is missing so everything is shifted down one
+       # so "cheat" and modify the line and do it again
+       if ($mode =~ /^\d+$/) {
+               $line =~ s/ $mode\s+dB/CW $mode dB/i;
+               (undef, undef, $origin, $qrg, $call, $mode, $s, $m, $spd, $u, $sort, $t, $tx) = split /[:\s]+/, $line;
+               dbg "RBN: inserted CW for missing mode" if $dbgrbn;
+       }
+       
        # fix up FT8 spots from 7001
        $t = $u, $u = '' if !$t && is_ztime($u);
        $t = $sort, $sort = '' if !$t && is_ztime($sort);