From cfd6c95eaa4899f2c70eca3d706d85b840c43791 Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 1 Mar 2003 11:28:41 +0000 Subject: [PATCH] fix for new database format --- Changes | 2 ++ cmd/show/isolate.pl | 4 ++-- cmd/show/lockout.pl | 4 ++-- cmd/show/registered.pl | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 3e07c7f2..214a84d0 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +28Feb03======================================================================= +1. Charlie K1XX fixed the sh/iso, sh/reg and sh/node commands 25Feb03======================================================================= 1. backported switch processing for PC sentences 24Feb03======================================================================= diff --git a/cmd/show/isolate.pl b/cmd/show/isolate.pl index 35eb822a..2bc94376 100644 --- a/cmd/show/isolate.pl +++ b/cmd/show/isolate.pl @@ -16,8 +16,8 @@ my @out; use DB_File; 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{isolate\s*=>}) { +for ($action = DXUser::R_FIRST, $count=0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) { + if ($data =~ m{isolate}) { my $u = DXUser->get_current($key); if ($u && $u->isolate) { push @out, $key; diff --git a/cmd/show/lockout.pl b/cmd/show/lockout.pl index c1a53f0e..178686c3 100644 --- a/cmd/show/lockout.pl +++ b/cmd/show/lockout.pl @@ -17,14 +17,14 @@ use DB_File; if ($line) { $line =~ s/[^\w\-\/]+//g; - $line = "^\U\Q$line"; + $line = "\U\Q$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 ($data =~ m{lockout}) { if ($line eq 'ALL' || $key =~ /$line/) { my $ur = DXUser->get_current($key); if ($ur && $ur->lockout) { diff --git a/cmd/show/registered.pl b/cmd/show/registered.pl index ebc468d1..340b2434 100644 --- a/cmd/show/registered.pl +++ b/cmd/show/registered.pl @@ -22,7 +22,7 @@ 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 ($data =~ m{registered}) { if (!$line || ($line && $key =~ /$line/)) { my $u = DXUser->get_current($key); if ($u && $u->registered) { -- 2.34.1