fix console.pl max scroll depth
[spider.git] / cmd / merge.pl
1 #
2 # merge spot and wwv databases
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 #
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 return (1, $self->msg('e11', $call)) if $call eq $main::mycall;
18         if ($call eq $main::mycall) {
19                 push @out, $self->msg('e11', $call);
20                 next;
21         }
22
23 my $ref = Route::Node::get($call);
24 my $dxchan = $ref->dxchan if $ref;
25 return (1, $self->msg('e10', $call)) unless $ref;
26
27
28 my ($spots, $wwv) = $f[1] =~ m{(\d+)/(\d+)} if $f[1];
29 $spots = 10 unless $spots;
30 $wwv = 5 unless $wwv;
31
32 # I know, I know -  but is there any point?
33 $dxchan->send("PC25^$call^$main::mycall^$spots^$wwv^");
34
35 return (1, $self->msg('merge1', $call, $spots, $wwv));
36
37