Change DXUser->get* to DXUser::get*
[spider.git] / cmd / set / sys_location.pl
index 903a5796526e7173074aabae7ed31b1495d8889c..33633b67ecac742a474b3c2020c3379419f294c0 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Copyright (c) 1998 - Dirk Koopman
 #
-# $Id$
+#
 #
 
 my ($self, $line) = @_;
@@ -17,15 +17,16 @@ $line =~ s/^\s+//;
 $line =~ s/\s+$//;
 
 return (1, $self->msg('loce1')) if !$line;
-return (1, $self->msg('loce2', $line)) unless $line =~ /\d+ \d+ [NnSs] \d+ \d+ [EeWw]/o;
+return (1, $self->msg('loce3', uc $line)) if is_qra($line);
+return (1, $self->msg('loce2', $line)) unless is_latlong($line);
 
-$user = DXUser->get_current($call);
+$user = DXUser::get_current($call);
 if ($user) {
        $line = uc $line;
        my ($lat, $long) = DXBearing::stoll($line);
        $user->lat($lat);
        $user->long($long);
-       DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
+       DXChannel::broadcast_all_nodes(DXProt::pc41($call, 3, $line), $main::me);
        if (!$user->qra) {
                my $qra = DXBearing::lltos($lat, $long);
                $user->qra($qra);