+05Jul99=======================================================================
+1. added stat/msg and stat/cluster commands to allow me to poke about inside
+the msg and cluster node tables.
04Jul99=======================================================================
1. removed silly 'new message has arrived' to connected nodes if message is
2. added a ! command to the console.pl program; works like the bash shell.
my ($self, $line) = @_;
my @f = split /\s+/, $line;
-my $call = uc $f[0];
# check for callsign
return (1, $self->msg('e5')) if $self->priv < 5;
return (1, $self->msg('e12')) if !$f[0];
+
+my $call = uc $f[0];
return (1, $self->msg('e11')) if $call eq $main::mycall;
my $ref = DXCluster->get_exact($call);
--- /dev/null
+#
+# show a cluster thingy
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line; # generate a list of callsigns
+@list = ($self->call) if !@list; # my channel if no callsigns
+
+my $call;
+my @out;
+foreach $call (@list) {
+ $call = uc $call;
+ my $ref = DXCluster->get_exact($call);
+ if ($ref) {
+ @out = print_all_fields($self, $ref, "Cluster Information $call");
+ } else {
+ push @out, "Cluster: $call not found";
+ }
+ push @out, "" if @list > 1;
+}
+
+return (1, @out);
--- /dev/null
+#
+# show all the values on a message header
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line; # generate a list of msg nos
+my @out;
+
+return (1, $self->msg('e5')) if $self->priv < 5;
+return (1, $self->msg('m16')) if @list == 0;
+
+foreach my $msgno (@list) {
+ my $ref = DXMsg::get($msgno);
+ if ($ref) {
+ @out = print_all_fields($self, $ref, "Msg Parameters $msgno");
+ } else {
+ push @out, $self->msg('m4', $msgno);
+ }
+ push @out, "" if @list > 1;
+}
+
+return (1, @out);
user => '9,DXUser ref',
startt => '0,Start Time,atime',
t => '9,Time,atime',
- pc50_t => '9,Last PC50 Time,atime',
+ pc50_t => '5,Last PC50 Time,atime',
priv => '9,Privilege',
state => '0,Current State',
oldstate => '5,Last State',
list => '9,Dep Chan List',
name => '0,User Name',
- consort => '9,Connection Type',
- 'sort' => '9,Type of Channel',
+ consort => '5,Connection Type',
+ 'sort' => '5,Type of Channel',
wwv => '0,Want WWV,yesno',
wx => '0,Want WX,yesno',
talk => '0,Want Talk,yesno',
dx => '0,DX Spots,yesno',
redirect => '0,Redirect messages to',
lang => '0,Language',
- func => '9,Function',
+ func => '5,Function',
loc => '9,Local Vars', # used by func to store local variables in
beep => '0,Want Beeps,yesno',
- lastread => '9,Last Msg Read',
- outbound => '9,outbound?,yesno',
+ lastread => '5,Last Msg Read',
+ outbound => '5,outbound?,yesno',
remotecmd => '9,doing rcmd,yesno',
pagelth => '0,Page Length',
pagedata => '9,Page Data Store',
group => '0,Access Group,parray', # used to create a group of users/nodes for some purpose or other
- isolate => '9,Isolate network,yesno',
- delayed => '9,Delayed messages,parray',
- annfilter => '9,Announce Filter',
- wwvfilter => '9,WWV Filter',
- spotfilter => '9,Spot Filter',
+ isolate => '5,Isolate network,yesno',
+ delayed => '5,Delayed messages,parray',
+ annfilter => '5,Announce Filter',
+ wwvfilter => '5,WWV Filter',
+ spotfilter => '5,Spot Filter',
passwd => '9,Passwd List,parray',
);
use Exporter;
@ISA = qw(Exporter);
use DXDebug;
+use DXUtil;
use Carp;
use strict;
%cluster = (); # this is where we store the dxcluster database
%valid = (
- mynode => '0,Parent Node,showcall',
+ mynode => '0,Parent Node,DXCluster::showcall',
call => '0,Callsign',
confmode => '0,Conference Mode,yesno',
here => '0,Here?,yesno',
- dxchan => '5,Channel ref',
+ dxchan => '5,Channel ref,DXCluster::showcall',
pcversion => '5,Node Version',
- list => '5,User List,dolist',
+ list => '5,User List,DXCluster::dolist',
users => '0,No of Users',
);
my ($self, $ele) = @_;
return $valid{$ele};
}
+#
+# return a list of valid elements
+#
+
+sub fields
+{
+ return keys(%valid);
+}
# this expects a reference to a list in a node NOT a ref to a node
sub dolist
my $out;
my $ref;
- foreach $ref (@{$self}) {
+ foreach my $call (keys %{$self}) {
+ $ref = $$self{$call};
my $s = $ref->{call};
$s = "($s)" if !$ref->{here};
$out .= "$s ";
$forwardfn = "$msgdir/forward.pl"; # the forwarding table
%valid = (
- fromnode => '9,From Node',
- tonode => '9,To Node',
+ fromnode => '5,From Node',
+ tonode => '5,To Node',
to => '0,To',
from => '0,From',
t => '0,Msg Time,cldatetime',
- private => '9,Private',
+ private => '5,Private',
subject => '0,Subject',
linesreq => '0,Lines per Gob',
- rrreq => '9,Read Confirm',
+ rrreq => '5,Read Confirm',
origin => '0,Origin',
lines => '5,Data',
stream => '9,Stream No',
- count => '9,Gob Linecnt',
- file => '9,File?,yesno',
- gotit => '9,Got it Nodes,parray',
- lines => '9,Lines,parray',
- 'read' => '9,Times read',
+ count => '5,Gob Linecnt',
+ file => '5,File?,yesno',
+ gotit => '5,Got it Nodes,parray',
+ lines => '5,Lines,parray',
+ 'read' => '5,Times read',
size => '0,Size',
msgno => '0,Msgno',
keep => '0,Keep this?,yesno',
- lastt => '9,Last processed,cldatetime',
- waitt => '9,Wait until,cldatetime',
+ lastt => '5,Last processed,cldatetime',
+ waitt => '5,Wait until,cldatetime',
);
sub DESTROY
m13 => 'Message no $_[0] missing',
m14 => 'Message no $_[0] marked as sent to $_[1]',
m15 => 'Message no $_[0] unmarked as sent to $_[1]',
+ m16 => 'Need a Message number',
merge1 => 'Merge request for $_[1] spots and $_[2] WWV sent to $_[0]',
namee1 => 'Please enter your name, set/name <your name>',
namee2 => 'Can\'t find user $_[0]!',