}
if ($pcno == 18) { # link request
+ $self->state('init');
+
+ # first clear out any nodes on this dxchannel
+ my @gonenodes = map { $_->dxchan == $self ? $_ : () } DXNode::get_all();
+ foreach my $node (@gonenodes) {
+ next if $node->dxchan == $DXProt::me;
+ broadcast_ak1a(pc21($node->call, 'Gone, re-init') , $self) unless $self->{isolate};
+ $node->del();
+ }
$self->send_local_config();
$self->send(pc20());
- $self->state('init');
return; # we don't pass these on
}
route($field[1], $line);
return;
}
+ if ($field[2] eq $main::mycall) {
+ dbg('chan', "Trying to merge to myself, ignored");
+ return;
+ }
Log('DXProt', "Merge request for $field[3] spots and $field[4] WWV from $field[1]");