- return if $rspfcheck and !$self->rspfcheck(1, $field[8], $field[7]);
-
- # do some de-duping
- my $d = cltounix($field[1], sprintf("%02d18Z", $field[2]));
- my $sfi = unpad($field[3]);
- my $k = unpad($field[4]);
- my $i = unpad($field[5]);
- my ($r) = $field[6] =~ /R=(\d+)/;
- $r = 0 unless $r;
- if (($pcno == 23 && $d < $main::systime - $pc23_max_age) || $d > $main::systime + 1500 || $field[2] < 0 || $field[2] > 23) {
- dbg("PCPROT: WWV Date ($field[1] $field[2]) out of range") if isdbg('chanerr');
- return;
- }
- if (Geomag::dup($d,$sfi,$k,$i,$field[6])) {
- dbg("PCPROT: Dup WWV Spot ignored\n") if isdbg('chanerr');
- return;
- }
- $field[7] =~ s/-\d+$//o; # remove spotter's ssid
+ $self->route_pc24($origin, $line, $ref, $_[3]);
+}
+
+# merge request
+sub handle_25
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+ if ($_[1] ne $main::mycall) {
+ $self->route($_[1], $line);
+ return;
+ }
+ if ($_[2] eq $main::mycall) {
+ dbg("PCPROT: Trying to merge to myself, ignored") if isdbg('chanerr');
+ return;
+ }
+
+ Log('DXProt', "Merge request for $_[3] spots and $_[4] WWV from $_[2]");
+
+ # spots
+ if ($_[3] > 0) {
+ my @in = reverse Spot::search(1, undef, undef, 0, $_[3]);
+ my $in;
+ foreach $in (@in) {
+ $self->send(pc26(@{$in}[0..4], $_[2]));
+ }
+ }
+
+ # wwv
+ if ($_[4] > 0) {
+ my @in = reverse Geomag::search(0, $_[4], time, 1);
+ my $in;
+ foreach $in (@in) {
+ $self->send(pc27(@{$in}[0..5], $_[2]));
+ }
+ }
+}
+
+sub handle_26 {goto &handle_11}
+sub handle_27 {goto &handle_23}
+
+# mail/file handling
+sub handle_28
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+ if ($_[1] eq $main::mycall) {
+ no strict 'refs';
+ my $sub = "DXMsg::handle_$pcno";
+ &$sub($self, @_);
+ } else {
+ $self->route($_[1], $line) unless $self->is_clx;
+ }
+}
+
+sub handle_29 {goto &handle_28}
+sub handle_30 {goto &handle_28}
+sub handle_31 {goto &handle_28}
+sub handle_32 {goto &handle_28}
+sub handle_33 {goto &handle_28}
+
+sub handle_34
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+ if (eph_dup($line, $eph_pc34_restime)) {
+ dbg("PCPROT: dupe PC34, ignored") if isdbg('chanerr');
+ } else {
+ $self->process_rcmd($_[1], $_[2], $_[2], $_[3]);
+ }
+}
+
+# remote command replies
+sub handle_35
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+ eph_del_regex("^PC35\\^$_[2]\\^$_[1]\\^");
+ $self->process_rcmd_reply($_[1], $_[2], $_[1], $_[3]);
+}
+
+sub handle_36 {goto &handle_34}
+
+# database stuff
+sub handle_37
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+ if ($_[1] eq $main::mycall) {
+ no strict 'refs';
+ my $sub = "DXDb::handle_$pcno";
+ &$sub($self, @_);
+ } else {
+ $self->route($_[1], $line) unless $self->is_clx;
+ }
+}
+
+# node connected list from neighbour
+sub handle_38
+{
+ my $self = shift;
+ my $pcno = shift;
+ my $line = shift;
+ my $origin = shift;
+}