fixed sh/node
authorminima <minima>
Mon, 31 Jul 2000 20:54:16 +0000 (20:54 +0000)
committerminima <minima>
Mon, 31 Jul 2000 20:54:16 +0000 (20:54 +0000)
improved import_users.pl
added some help
fixed paging?
removed bogus callsign check on PC12

Changes
cmd/Commands_en.hlp
cmd/show/node.pl
perl/DXCommandmode.pm
perl/DXProt.pm
perl/DXUser.pm
perl/create_sysop.pl
perl/import_users.pl

diff --git a/Changes b/Changes
index 968fc9ef20e1928b0d2c24f99691fbfa8c4ee4a2..c1b9e423c735f0b724e157484d6ca02df431ccf6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+31Jul00=======================================================================
+1. try to fix paging problem.
+2. added help for spoof and set/forward
+3. fixed bogus callsign check for field 2 of a PC12
 30Jul00=======================================================================
 1. Added talk mode so that I don't have to keep typing T <call> all the time.
 2. fiddled around with storing of Debug messages a bit more.
index 77025c1a9b6517524071767a105517f0964e82e4..585811d29b4710a00bd777b2998cb036839d8d5e 100644 (file)
@@ -300,6 +300,10 @@ delete a command in the local_cmd tree and want to use the normal one
 again. Execute this command to reset everything back to the state it
 was just after a cluster restart.
 
+=== 9^LOAD/FORWARD^Reload the msg forwarding routing table
+Reload the /spider/msg/forward.pl file if you have changed it
+manually whilst the cluster is running.
+
 === 9^LOAD/MESSAGES^Reload the system messages file
 If you change the /spider/perl/Messages file (usually whilst
 fiddling/writing new commands) you can have them take effect during a
@@ -870,6 +874,16 @@ Display the most recent WWV information that has been received by the system
 === 5^SHUTDOWN^Shutdown the cluster
 Shutdown the cluster and disconnect all the users 
 
+=== 9^SPOOF <call> <command>^Do a command as though you are another user
+This command is provided so that sysops can set a user's parameters without
+me having to write a special 'sysop' version for every user command. It
+allows you to pretend that you are doing the command as the user you specify.
+
+eg:-
+
+   SPOOF G1TLH set/name Dirk
+   SPOOF G1TLH set/qra JO02LQ
+
 === 5^STAT/DB <dbname>^Show the status of a database
 Show the internal status of a database descriptor.
 
index 9bc77e2a031f454c51c3983ce58c000c6cd4f179..9b6938a60db6489ec1d2166d8486def5cda98cc5 100644 (file)
@@ -19,17 +19,18 @@ return (1, $self->msg('e5')) unless $self->priv >= 1;
 
 my @call = map {uc $_} split /\s+/, $line; 
 my @out;
+my $count;
 
 # search thru the user for nodes
 unless (@call) {
        use DB_File;
        
-       my ($action, $count, $key, $data);
+       my ($action, $key, $data);
        for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) {
                if ($data =~ m{sort => '[ACRSX]'}) {
                    push @call, $key;
+                       ++$count;
                }
-               ++$count;
        } 
 }
 
@@ -67,6 +68,7 @@ foreach $call (@call) {
        } else {
                push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : "      ");
        }
+    ++$count;
 }
 
 return (1, @out, $self->msg('rec', $count));
index 4eca6e74abfc930b6c7408bc5d453be1f2e7b2b2..d8f6eb54d6bbb7ab61b603b058ac5b71da874d49 100644 (file)
@@ -258,7 +258,7 @@ sub send_ans
                        $line =~ s/\s+$//o;     # why am having to do this? 
                        $self->send($line);
                }
-               $self->{pagedata} =  \@_;
+               $self->{pagedata} =  [ @_ ];
                $self->state('page');
                $self->send($self->msg('page', scalar @_));
        } else {
index 310416e8dfda883713b863a969a080867e2d55a6..8ca96434b1448a44f9cdfeb133025cf0247cdbcc 100644 (file)
@@ -315,7 +315,7 @@ sub normal
                }
                
                if ($pcno == 12) {              # announces
-                       unless (is_callsign($field[1]) && is_callsign($field[2]) && is_callsign($field[5])) {
+                       unless (is_callsign($field[1]) && is_callsign($field[5])) {
                                dbg('chan', "Corrupt announce, rejected");
                                return;
                        }
index 49745722ffd29ae51badd4e665a9f192853a8d00..eaf880392c26e880198220c5fd7437ec53d3ea47 100644 (file)
@@ -8,9 +8,6 @@
 
 package DXUser;
 
-require Exporter;
-@ISA = qw(Exporter);
-
 use DXLog;
 use DB_File;
 use Data::Dumper;
@@ -104,6 +101,15 @@ sub init
        $filename = $fn;
 }
 
+sub del_file
+{
+       my ($pkg, $fn, $mode) = @_;
+  
+       confess "need a filename in User" if !$fn;
+       $fn .= ".v2";
+       unlink $fn;
+}
+
 use strict;
 
 #
index 95fc063600d588abccc944741b82b2731291734f..52cd941f779c7b05ec6e9e8ebb2c6221c9f8c493 100755 (executable)
@@ -23,7 +23,7 @@ use DXUser;
 
 sub delete_it
 {
-       system("rm -f $userfn*");
+       DXUser->del_file($userfn);
 }
 
 sub create_it
index 7f77a56460b988c6b9db38ecbc191b38f45c0cb5..159989b83d8a1ae283e638a51c2fff2cacadd608 100755 (executable)
@@ -20,14 +20,17 @@ BEGIN {
 
 use DXVars;
 use DXUser;
+use DXUtil;
 use Carp;
 
 $inpfn = $ARGV[0] if @ARGV;
 croak "need a input filename" unless $inpfn;
 
+DXUser->del_file($userfn);
 DXUser->init($userfn, 1);
 
-do "$inpfn";
+my $s = readfilestr "$inpfn";
+eval $s;
 print $@ if $@;
 
 DXUser->finish();