X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRBN.pm;h=6924626f3d5b7486abab018c55ef4dcbc5a056fa;hb=05f7954ba3271d864a904b4f0606a3394941343c;hp=e844b6d6bcba0c5597a948b2c5fc765520cd45d2;hpb=ca5baf12f22e041cb14af595254af4ae88d82ae0;p=spider.git diff --git a/perl/RBN.pm b/perl/RBN.pm index e844b6d6..6924626f 100644 --- a/perl/RBN.pm +++ b/perl/RBN.pm @@ -194,7 +194,7 @@ sub start $self->{width} = 80 unless $self->{width} && $self->{width} > 80; $self->{consort} = $line; # save the connection type - LogDbg('DXCommand', "$call connected from $self->{hostname}"); + LogDbg('err', "$call connected from $self->{hostname}"); # set some necessary flags on the user if they are connecting $self->{registered} = 1; @@ -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); @@ -369,7 +377,7 @@ sub normal 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"); + LogDbg('err',"RBN Someone is playing silly persons $rcall is not a user and cannot do 'seeme', ignored and reset"); del_seeme($rcall); } } @@ -852,7 +860,7 @@ sub per_minute next unless $dxchan->is_rbn; dbg "RBN:STATS minute $dxchan->{call} raw: $dxchan->{noraw} retrieved spots: $dxchan->{norbn} delivered: $dxchan->{nospot} after filtering to users: " . scalar keys %{$dxchan->{nousers}} if isdbg('rbnstats'); if ($dxchan->{noraw} == 0 && $dxchan->{lasttime} > 60) { - LogDbg('RBN', "RBN: no input from $dxchan->{call}, disconnecting"); + LogDbg('err', "RBN: no input from $dxchan->{call}, disconnecting"); $dxchan->disconnect; } $dxchan->{noraw} = $dxchan->{norbn} = $dxchan->{nospot} = 0; $dxchan->{nousers} = {}; @@ -908,7 +916,10 @@ sub finish sub write_cache { + return unless $json; + my $ta = [ gettimeofday ]; + $json->indent(1)->canonical(1) if isdbg 'rbncache'; my $s = eval {$json->encode($spots)}; if ($s) {