fix cosmetic errors in for/oper for users
authorminima <minima>
Wed, 8 Nov 2000 21:36:16 +0000 (21:36 +0000)
committerminima <minima>
Wed, 8 Nov 2000 21:36:16 +0000 (21:36 +0000)
Changes
cmd/forward/opername.pl

diff --git a/Changes b/Changes
index d533d649105d941c740d3fe5b1205e2c97b0aff7..e15e223329cbd5bba605cc29cbb5b754b63a0e61 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,9 +1,12 @@
+08Nov00=======================================================================
+1. fix cosmetic errors in for/oper for 'users'.
 07Nov00=======================================================================
 1. removed sh/call because the owner isn't happy about us using it. 
 2. change sh/qrz to the new interface. MUCH QUICKER! you will need a user id
 and password from qrz.com to use it and you will have to copy the 
 /spider/perl/Internet.pm to /spider/local and alter it accordingly. Do 
-remember to set $allow=1 as well!
+remember to set $allow=1 as well! The new interface comes courtesy of Fred
+LLoyd, the proprietor of http://www.qrz.com
 06Nov00=======================================================================
 1. Added sh/qrz to the list of callbook services
 05Nov00=======================================================================
index 2da3d95b5f26f8b2d33c82ba8264db18ddce78b1..314a9e37b0b5d54e24fa3f334ba94d98736a3dcb 100644 (file)
@@ -9,25 +9,32 @@
 my ($self, $line) = @_;
 my @f = split /\s+/, uc $line;
 my @out;
-my $call;
 
-if (@f == 0) {
-       return (1, $self->('e6')) if ($self->priv < 1); 
-} else {
-       foreach $call (@f) {
-               my $ref = DXUser->get_current($call);
-               if ($ref) {
-                       my $name = $ref->name;  
-                       my $qth = $ref->qth;
-                       my $lat = $ref->lat;
-                       my $long = $ref->long;
-                       my $node = $ref->homenode;
-                       my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
-                       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
-                       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
-                       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
-                       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
-               }
+if ($self->priv < 1) {
+       if (@f == 0) {
+               push @f, $self->call;
+       } else {
+               return (1, $self->msg('e5'));
+       }
+} elsif (@f == 0) {
+       return (1, $self->msg('e6'));
+}
+
+my $call;
+foreach $call (@f) {
+       my $ref = DXUser->get_current($call);
+       if ($ref) {
+               my $name = $ref->name;  
+               my $qth = $ref->qth;
+               my $lat = $ref->lat;
+               my $long = $ref->long;
+               my $node = $ref->homenode;
+               my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
+               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
+               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
+               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
+               DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
        }
 }
+
 return (1, @out);