added more help
[spider.git] / cmd / forward / opername.pl
1 #
2 # Cause node to send PC41 info frames
3 #
4 # Copyright (c) 1998 - Iain Philipps G0RDI
5 #
6 # Mods by Dirk Koopman G1TLH 12Dec98
7 #
8
9 my ($self, $line) = @_;
10 my @f = split /\s+/, uc $line;
11 my @out;
12 my $call;
13
14 if (@f == 0) {
15         return (1, $self->('e6')) if ($self->priv < 1); 
16 } else {
17         foreach $call (@f) {
18                 my $ref = DXUser->get_current($call);
19                 if ($ref) {
20                         my $name = $ref->name;  
21                         my $qth = $ref->qth;
22                         my $lat = $ref->lat;
23                         my $long = $ref->long;
24                         my $node = $ref->homenode;
25                         my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
26                         DXProt::broadcast_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
27                         DXProt::broadcast_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
28                         DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
29                         DXProt::broadcast_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
30                 }
31         }
32 }
33 return (1, @out);