projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix 5.8 ism that does not work on 5.6 (incrementing a subroutine).
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 5bf0d1f935f367fe3dfdc110b3986706bc90a0be..352a4f6a4aae9bd715467aab117ad842bd295dd9 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-50,7
+50,8
@@
use vars qw($pc11_max_age $pc23_max_age $last_pc50 $eph_restime $eph_info_restim
$pingint $obscount %pc19list $chatdupeage $chatimportfn
$investigation_int $pc19_version $myprot_version
%nodehops $baddx $badspotter $badnode $censorpc $rspfcheck
$pingint $obscount %pc19list $chatdupeage $chatimportfn
$investigation_int $pc19_version $myprot_version
%nodehops $baddx $badspotter $badnode $censorpc $rspfcheck
- $allowzero $decode_dk0wcy $send_opernam @checklist);
+ $allowzero $decode_dk0wcy $send_opernam @checklist
+ $handle_xml);
$pc11_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc11
$pc23_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc23
$pc11_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc11
$pc23_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc23
@@
-78,11
+79,12
@@
$chatdupeage = 20 * 60 * 60;
$chatimportfn = "$main::root/chat_import";
$investigation_int = 12*60*60; # time between checks to see if we can see this node
$pc19_version = 5466; # the visible version no for outgoing PC19s generated from pc59
$chatimportfn = "$main::root/chat_import";
$investigation_int = 12*60*60; # time between checks to see if we can see this node
$pc19_version = 5466; # the visible version no for outgoing PC19s generated from pc59
+$handle_xml = 0; # handle XML sentences
@checklist =
(
[ qw(i c c m bp bc c) ], # pc10
@checklist =
(
[ qw(i c c m bp bc c) ], # pc10
- [ qw(i f
m d t m c c h) ],
# pc11
+ [ qw(i f
bm d t m c c h) ],
# pc11
[ qw(i c bm m bm bm p h) ], # pc12
[ qw(i c h) ], #
[ qw(i c h) ], #
[ qw(i c bm m bm bm p h) ], # pc12
[ qw(i c h) ], #
[ qw(i c h) ], #
@@
-326,21
+328,6
@@
sub sendinit
$self->send(pc18());
}
$self->send(pc18());
}
-sub removepc90
-{
- $_[0] =~ s/^PC90\^[-A-Z0-9]+\^\d+\^//;
- $_[0] =~ s/^PC91\^[-A-Z0-9]+\^\d+\^[-A-Z0-9]+\^//;
-}
-
-#sub send
-#{
-# my $self = shift;
-# while (@_) {
-# my $line = shift;
-# $self->SUPER::send($line);
-# }
-#}
-
#
# This is the normal pcxx despatcher
#
#
# This is the normal pcxx despatcher
#
@@
-348,9
+335,6
@@
sub normal
{
my ($self, $line) = @_;
{
my ($self, $line) = @_;
- # remove any incoming PC90 frames
- removepc90($line);
-
my @field = split /\^/, $line;
return unless @field;
my @field = split /\^/, $line;
return unless @field;
@@
-946,6
+930,7
@@
sub handle_18
$self->user->put;
$self->sort('S');
}
$self->user->put;
$self->sort('S');
}
+ $self->{handle_xml}++ if $_[1] =~ /\bxml\b/;
} else {
$self->version(50.0);
$self->version($_[2] / 100) if $_[2] && $_[2] =~ /^\d+$/;
} else {
$self->version(50.0);
$self->version($_[2] / 100) if $_[2] && $_[2] =~ /^\d+$/;
@@
-1236,21
+1221,22
@@
sub handle_23
}
# global wwv filtering on INPUT
}
# global wwv filtering on INPUT
- my @dxcc = ((Prefix::cty_data($_[
6]))[0..2], (Prefix::cty_data($_[7
]))[0..2]);
+ my @dxcc = ((Prefix::cty_data($_[
7]))[0..2], (Prefix::cty_data($_[8
]))[0..2]);
if ($self->{inwwvfilter}) {
my ($filter, $hops) = $self->{inwwvfilter}->it(@_[7,8], $origin, @dxcc);
unless ($filter) {
if ($self->{inwwvfilter}) {
my ($filter, $hops) = $self->{inwwvfilter}->it(@_[7,8], $origin, @dxcc);
unless ($filter) {
- dbg("PCPROT: Rejected by input
spot
filter") if isdbg('chanerr');
+ dbg("PCPROT: Rejected by input
wwv
filter") if isdbg('chanerr');
return;
}
}
return;
}
}
- if (Geomag::dup($d,$sfi,$k,$i,$_[6])) {
+ $_[7] =~ s/-\d+$//o; # remove spotter's ssid
+ if (Geomag::dup($d,$sfi,$k,$i,$_[6],$_[7])) {
dbg("PCPROT: Dup WWV Spot ignored\n") if isdbg('chanerr');
return;
}
dbg("PCPROT: Dup WWV Spot ignored\n") if isdbg('chanerr');
return;
}
- $_[7] =~ s/-\d+$//o; # remove spotter's ssid
- my $wwv = Geomag::update($d, $_[2], $sfi, $k, $i, @_[6..8], $r);
+ # note this only takes the first one it gets
+ Geomag::update($d, $_[2], $sfi, $k, $i, @_[6..8], $r);
my $rep;
eval {
my $rep;
eval {