1. Upped the version no !!!!
[spider.git] / cmd / merge.pl
1 #
2 # merge spot and wwv databases
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
11
12 # check for callsign
13 return (1, $self->msg('e5')) if $self->priv < 5;
14 return (1, $self->msg('e12')) if !$f[0];
15
16 my $call = uc $f[0];
17 my $ref = DXCluster->get_exact($call);
18 my $dxchan = $ref->dxchan if $ref;
19 return (1, $self->msg('e10', $call)) unless $ref;
20 return (1, $self->msg('e13', $call)) unless $ref->isa('DXNode');
21
22
23 my ($spots, $wwv) = $f[1] =~ m{(\d+)/(\d+)} if $f[1];
24 $spots = 10 unless $spots;
25 $wwv = 5 unless $wwv;
26
27 # I know, I know -  but is there any point?
28 $dxchan->send("PC25^$call^$main::mycall^$spots^$wwv^");
29
30 return (1, $self->msg('merge1', $call, $spots, $wwv));
31
32