]> dxcluster.net Git - spider.git/commitdiff
fix some issues with new format
authorminima <minima>
Thu, 27 Mar 2003 11:51:02 +0000 (11:51 +0000)
committerminima <minima>
Thu, 27 Mar 2003 11:51:02 +0000 (11:51 +0000)
Changes
cmd/show/lockout.pl
cmd/show/node.pl
cmd/show/registered.pl
perl/Messages

diff --git a/Changes b/Changes
index dc8b736620c160d6c19ebf7b016060f9354c0e26..8099f15020b34b127b060f3fdf7126441e324e24 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+27Mar03=======================================================================
+1. play around with sh/reg, sh/iso, sh/node and sh/lock to make them work
+slightly better with the new user format.
 26Mar03=======================================================================
 1. add some ak1a compatibility changes to chat
 2. added help text for chat, join, leave and sh/chat.
index 178686c3b987e0565dc488133b789906537f611c..02acee096122565c74a63d4323aabdc9d049a4da 100644 (file)
@@ -23,17 +23,19 @@ if ($line) {
 return (1, $self->msg('lockoutuse')) unless $line;
 
 my ($action, $count, $key, $data) = (0,0,0,0);
-for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
-       if ($data =~ m{lockout}) {
-               if ($line eq 'ALL' || $key =~ /$line/) {
-                       my $ur = DXUser->get_current($key);
-                       if ($ur && $ur->lockout) {
-                               push @out, $key;
-                               ++$count;
+eval qq{for (\$action = DXUser::R_FIRST, \$count = 0; !\$DXUser::dbm->seq(\$key, \$data, \$action); \$action = DXUser::R_NEXT) {
+       if (\$data =~ m{lockout}) {
+               if (\$line eq 'ALL' || \$key =~ /^$line/) {
+                       my \$ur = DXUser->get_current(\$key);
+                       if (\$ur && \$ur->lockout) {
+                               push \@out, \$key;
+                               ++\$count;
                        }
                }
        }
-} 
+} };
+
+push @out, $@ if $@;
 
 return (1, @out, $self->msg('rec', $count));
 
index 46e0b32d9d66e072d6896fce55191a6a052ad34f..063e2e4288942785e29e909b6158723d79caaa10 100644 (file)
@@ -16,6 +16,7 @@
 
 my ($self, $line) = @_;
 return (1, $self->msg('e5')) unless $self->priv >= 1;
+return (1, $self->msg('storable')) unless $DXUser::v3;
 
 my @call = map {uc $_} split /\s+/, $line; 
 my @out;
@@ -26,7 +27,7 @@ if ($call[0] eq 'ALL') {
        shift @call;
        my ($action, $key, $data) = (0,0,0);
        for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
-               if ($data =~ m{sort => '[ACRSX]'}) {
+               if ($data =~ m{\01[ACRSX]\0\0\0\04sort}) {
                    push @call, $key;
                        ++$count;
                }
@@ -39,7 +40,7 @@ my $call;
 foreach $call (@call) {
        my $clref = Route::Node::get($call);
        my $uref = DXUser->get_current($call);
-       my ($sort, $ver);
+       my ($sort, $ver, $build);
        
        my $pcall = sprintf "%-11s", $call;
        push @out, $self->msg('snode1') unless @out > 0;
@@ -56,16 +57,20 @@ foreach $call (@call) {
                push @out, $self->msg('snode3', $call);
                next;
        }
+       $ver = "";
+       $build = "";
        if ($call eq $main::mycall) {
                $sort = "Spider";
                $ver = $main::version;
        } else {
                $ver = $clref->version if $clref && $clref->version;
+               $ver = $uref->version if $ver && $uref->version;
        }
        
        my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;
        if ($uref->is_spider) {
-               push @out, $self->msg('snode2', $pcall, $sort, "$ver  ");
+               $build = "build: " . $uref->build if $uref->build;
+               push @out, $self->msg('snode2', $pcall, $sort, "$ver $build");
        } else {
                push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : "      ");
        }
index 340b24344f6f541817c6bc89890c73e80d4dd5e2..e4b6bce958c54f1ed8fffdd77f33fc5ba365f2b6 100644 (file)
@@ -21,17 +21,19 @@ if ($line) {
 }
 
 my ($action, $count, $key, $data) = (0,0,0,0);
-for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
-       if ($data =~ m{registered}) {                                   
-               if (!$line || ($line && $key =~ /$line/)) {
-                       my $u = DXUser->get_current($key);
-                       if ($u && $u->registered) {
-                               push @out, $key;
-                               ++$count;
+eval qq{for (\$action = DXUser::R_FIRST, \$count = 0; !\$DXUser::dbm->seq(\$key, \$data, \$action); \$action = DXUser::R_NEXT) {
+       if (\$data =~ m{registered}) {                                  
+               if (!\$line || (\$line && \$key =~ /^$line/)) {
+                       my \$u = DXUser->get_current(\$key);
+                       if (\$u && \$u->registered) {
+                               push \@out, \$key;
+                               ++\$count;
                        }
                }
        }
-} 
+} };
+
+push @out, $@ if $@;
 
 return (1, @out, $self->msg('rec', $count));
 
index 34d929011863982e5ca86f00fdc6f8fe9b8b4403..27147c08b5b1ac88a2423253024987a1d83544fa 100644 (file)
@@ -271,6 +271,7 @@ package DXM;
                                statvhf => 'VHF+ DX Spot Stats, last $_[1] days from $_[0]',
                                statvhft => 'VHF+ DX Spot Stats, last $_[2] days from $_[1] for DXCC $_[0]',
                                statdx => 'Total DX Spots for $_[1] days from $_[0]',
+                               storable => 'Please load the Storable module from CPAN', 
                                sun => 'Location                              dd/mm/yyyy Rise   Set',
                                sun_with_azel => 'Location                              dd/mm/yyyy Rise   Set      Azim   Elev',
                                susdb1 => 'usage: callsign state city',