Change DXUser->get* to DXUser::get*
[spider.git] / cmd / show / users.pl
index 7d5496a9d4592591cc679235cea2f94439ecb49a..1d665eba5a91858dbdfa89f33bb42879e776753b 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Copyright (c) 1998 Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 
 my ($self, $line) = @_;
@@ -12,7 +12,7 @@ my @out;
 
 if (@list) {
        foreach my $call (sort @list) {
-               my $uref = DXUser->get_current($call);
+               my $uref = DXUser::get_current($call);
                if ($uref) {
                        my $name = $uref->name || '?';
                        my $qth = $uref->qth || '?';
@@ -28,16 +28,14 @@ if (@list) {
        }
 } else {
        my $node = $main::routeroot;
-       push @out, "Callsigns connected to $main::mycall";
+       push @out, join(' ', $self->msg('userconn'), $main::mycall);
        my $call;
-       my $i = 0;
        my @l;
        my @val = sort $node->users;
        foreach $call (@val) {
-               if ($i >= 5) {
+               if (@l >= 5) {
                        push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
                        @l = ();
-                       $i = 0;
                }
                my $uref = Route::User::get($call);
                my $s = $call;
@@ -47,9 +45,8 @@ if (@list) {
                        $s = "$call?";
                }
                push @l, $s;
-               $i++;
        }
-       push @l, "" while $i++ < 5;
+       push @l, "" while @l < 5;
        push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
 }