1998-12-22 17:44:59 +00:00
|
|
|
#
|
|
|
|
# merge spot and wwv databases
|
|
|
|
#
|
|
|
|
# Copyright (c) 1998 - Dirk Koopman G1TLH
|
|
|
|
#
|
2007-07-11 15:41:51 +00:00
|
|
|
#
|
1998-12-22 17:44:59 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
my ($self, $line) = @_;
|
|
|
|
my @f = split /\s+/, $line;
|
|
|
|
|
|
|
|
# check for callsign
|
|
|
|
return (1, $self->msg('e5')) if $self->priv < 5;
|
|
|
|
return (1, $self->msg('e12')) if !$f[0];
|
1999-07-05 22:06:34 +00:00
|
|
|
|
|
|
|
my $call = uc $f[0];
|
2015-12-30 19:34:38 +00:00
|
|
|
return (1, $self->msg('e11', $call)) if $call eq $main::mycall;
|
|
|
|
if ($call eq $main::mycall) {
|
|
|
|
push @out, $self->msg('e11', $call);
|
|
|
|
next;
|
|
|
|
}
|
1998-12-22 17:44:59 +00:00
|
|
|
|
2001-08-08 15:56:49 +00:00
|
|
|
my $ref = Route::Node::get($call);
|
1998-12-28 23:29:13 +00:00
|
|
|
my $dxchan = $ref->dxchan if $ref;
|
|
|
|
return (1, $self->msg('e10', $call)) unless $ref;
|
1998-12-22 17:44:59 +00:00
|
|
|
|
|
|
|
|
1999-01-03 16:26:57 +00:00
|
|
|
my ($spots, $wwv) = $f[1] =~ m{(\d+)/(\d+)} if $f[1];
|
1998-12-22 17:44:59 +00:00
|
|
|
$spots = 10 unless $spots;
|
|
|
|
$wwv = 5 unless $wwv;
|
|
|
|
|
|
|
|
# I know, I know - but is there any point?
|
|
|
|
$dxchan->send("PC25^$call^$main::mycall^$spots^$wwv^");
|
|
|
|
|
|
|
|
return (1, $self->msg('merge1', $call, $spots, $wwv));
|
|
|
|
|
|
|
|
|