+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.
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
=== 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.
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;
}
}
} else {
push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : " ");
}
+ ++$count;
}
return (1, @out, $self->msg('rec', $count));
$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 {
}
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;
}
package DXUser;
-require Exporter;
-@ISA = qw(Exporter);
-
use DXLog;
use DB_File;
use Data::Dumper;
$filename = $fn;
}
+sub del_file
+{
+ my ($pkg, $fn, $mode) = @_;
+
+ confess "need a filename in User" if !$fn;
+ $fn .= ".v2";
+ unlink $fn;
+}
+
use strict;
#
sub delete_it
{
- system("rm -f $userfn*");
+ DXUser->del_file($userfn);
}
sub create_it
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();