From: djk Date: Tue, 9 Nov 1999 23:01:44 +0000 (+0000) Subject: added some extra cases for IOTA and QSL detection on sh/dx X-Git-Tag: R_1_34 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5cfa31743b1c94671a59c5e05a0b44cfc5798a23;p=spider.git added some extra cases for IOTA and QSL detection on sh/dx added stat/db added some help for databases --- diff --git a/cmd/Aliases b/cmd/Aliases index ef5172cc..6ef3b166 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -94,6 +94,7 @@ package CmdAlias; '^sh\w*/bu', 'show/files bulletins', 'show/files', '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration', '^sh\w*/c$', 'show/configuration', 'show/configuration', + '^sh\w*/com', 'dbavail', 'dbavail', '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx', '^sh\w*/dx/(\d+)', 'show/dx $1', 'show/dx', '^sh\w*/dx/d(\d+)', 'show/dx from $1', 'show/dx', diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index aec709dd..3964680f 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -53,6 +53,110 @@ and to undo what you have just done:- which will arrange for them to be forward candidates again. +=== 0^DBAVAIL^Show a list of all the Databases in the system +Title says it all really, this command lists all the databases defined +in the system. It is also aliased to SHOW/COMMAND. + +=== 9^DBCREATE ^Create a database entry +=== 9^DBCREATE chain [..]^Create a chained database entry +=== 9^DBCREATE remote ^Create a remote database entry +DBCREATE allows you to define a database in the system. It doesn't actually +create anything, just defines it. + +The databases that are created are simple DB_File hash databases, they are +therefore already 'indexed'. + +You can define a local database with the first form of the command eg: + + DBCREATE oblast + +You can also chain databases with the addition of the 'chain' keyword. +This will search each database one after the other. A typical example +is: + + DBCREATE sdx_qsl chain sql_ad + +No checking is done to see if the any of the chained databases exist, in +fact it is usually better to do the above staement first then do each of +the chained databases. + +Databases can exist offsite. To define a database that lives on another +node do: + + DBCREATE buckmaster remote gb7dxc + +Remote databases cannot be chained; however, the last database in a +a chain can be a remote database eg: + + DBCREATE qsl chain gb7dxc + + +To see what databases have been defined do: + + DBAVAIL (or it will have been aliased to SHOW/COMMAND) + +It would be normal for you to add an entry into your local Aliases file +to allow people to use the 'SHOW/' style syntax. So you would +need to add a line like:- + + 's' => [ + .. + .. + '^sh\w*/buc', 'dbshow buckmaster', 'dbshow', + .. + .. + ], + +to allow + + SH/BUCK g1tlh + +to work as they may be used to. + +See DBIMPORT for the importing of existing AK1A format data to databases. +See DBSHOW for generic database enquiry + +=== 9^DBIMPORT ^Import AK1A data into a database +If you want to import or update data in bulk to a database you can use +this command. It will either create or update entries into an existing +database. For example:- + + DBIMPORT oblast /tmp/OBLAST.FUL + +will import the standard OBLAST database that comes with AK1A into the +oblast database held locally. + +=== 9^DBREMOVE ^Delete a database +DBREMOVE will completely remove a database entry and also delete any data +file that is associated with it. + +There is no warning, no comeback, no safety net. + +For example: + + DBREMOVE oblast + +will remove the oblast database from the system and it will also remove +the associated datafile. + +I repeat: + +There is no warning, no comeback, no safety net. + +You have been warned. + +=== 0^DBSHOW ^Display an entry, if it exists, in a database +This is the generic user interface to the database to the database system. +It is expected that the sysop will add an entry to the local Aliases file +so that users can use the more familiar AK1A style of enquiry such as: + + SH/BUCK G1TLH + +but if he hasn't and the database really does exist (use DBAVAIL or +SHOW/COMMAND to find out) you can do the same thing with: + + DBSHOW buck G1TLH + === 9^DEBUG^Set the cluster program into debug mode Executing this command will only have an effect if you are running the cluster in debug mode i.e. @@ -553,12 +657,22 @@ 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 +=== 5^STAT/DB ^Show the status of a database +Show the internal status of a database descriptor. + +Depending on your privilege level you will see more or less information. +This command is unlikely to be of much use to anyone other than a sysop. + === 5^STAT/CHANNEL []^Show the status of a channel on the cluster Show the internal status of the channel object either for the channel that you are on or else for the callsign that you asked for. Only the fields that are defined (in perl term) will be displayed. +=== 5^STAT/MSG ^Show the status of a message +This command shows the internal status of a message and includes information +such as to whom it has been forwarded, its size, origin etc etc. + === 5^STAT/USER []^Show the full status of a user Shows the full contents of a user record including all the secret flags and stuff. diff --git a/cmd/dbstatus.pl b/cmd/dbstatus.pl deleted file mode 100644 index 34198bfa..00000000 --- a/cmd/dbstatus.pl +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl -# -# Database update routine -# -# Copyright (c) 1999 Dirk Koopman G1TLH -# -my ($self, $line) = @_; -my @f = split /\s+/, $line; -my @out; - - -return (1, @out); diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl index a70ef50f..2af75e7c 100644 --- a/cmd/show/dx.pl +++ b/cmd/show/dx.pl @@ -65,12 +65,12 @@ while ($f = shift @list) { # next field my ($a, $b); # $DB::single =1; - if ($list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d\d\d)/oi)) { + if ($list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d?\d\d)/oi)) { $a = uc $a; $doiota = "\\b$a\[\-\ \]\?$b\\b"; shift @list; } - $doiota = '\b(IOTA|(AF|AN|NA|SA|EU|AS|OC)[- ]?\d\d\d)\b' unless $doiota; + $doiota = '\b(IOTA|(AF|AN|NA|SA|EU|AS|OC)[- ]?\d?\d\d)\b' unless $doiota; next; } if (lc $f eq 'qra') { @@ -121,7 +121,7 @@ if ($spotter) { # qsl requests if ($doqsl) { $expr .= " && " if $expr; - $expr .= "\$f3 =~ m{(QSL|VIA)}io"; + $expr .= "\$f3 =~ m{(\@|>|QSL|VIA)}io"; } # iota requests diff --git a/cmd/stat/db.pl b/cmd/stat/db.pl new file mode 100644 index 00000000..04240cd2 --- /dev/null +++ b/cmd/stat/db.pl @@ -0,0 +1,24 @@ +# +# show all the values in a db fcb +# +# $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 $name (@list) { + my $ref = DXDb::getdesc($name); + if ($ref) { + @out = print_all_fields($self, $ref, "DB Parameters $name"); + } else { + push @out, $self->msg('db3', $name); + } + push @out, "" if @list > 1; +} + +return (1, @out); diff --git a/perl/DXDb.pm b/perl/DXDb.pm index bccfb6dd..25e7c082 100644 --- a/perl/DXDb.pm +++ b/perl/DXDb.pm @@ -21,24 +21,27 @@ $opentime = 5*60; # length of time a database stays open after last access $dbbase = "$main::root/db"; # where all the databases are kept; %avail = (); # The hash contains a list of all the databases %valid = ( - accesst => '9,Last Access Time,atime', + accesst => '9,Last Accs Time,atime', createt => '9,Create Time,atime', - lastt => '9,Last Update Time,atime', + lastt => '9,Last Upd Time,atime', name => '0,Name', db => '9,DB Tied hash', remote => '0,Remote Database', - pre => '0,Heading text', - post => '0,Tail text', + pre => '0,Heading txt', + post => '0,Tail txt', chain => '0,Search these,parray', disable => '0,Disabled?,yesno', - nf => '0,Not Found text', - cal => '0,No Key text', - allowread => '9,Allowed to read,parray', - denyread => '9,Deny to read,parray', - allowupd => '9,Allow to update,parray', - denyupd => '9,Deny to update,parray', - fwdupd => '9,Forward updates to,parray', + nf => '0,Not Found txt', + cal => '0,No Key txt', + allowread => '9,Allowed read,parray', + denyread => '9,Deny read,parray', + allowupd => '9,Allow upd,parray', + denyupd => '9,Deny upd,parray', + fwdupd => '9,Forw upd to,parray', template => '9,Upd Templates,parray', + te => '9,End Upd txt', + tae => '9,End App txt', + atemplate => '9,App Templates,parray', help => '0,Help txt,parray', ); @@ -97,7 +100,7 @@ sub getdesc # search for a partial if not found direct unless ($r) { - for (values %avail) { + for (sort { $a->{name} cmp $b->{name} }values %avail) { if ($_->{name} =~ /^$name/) { $r = $_; last; diff --git a/perl/Database.pm b/perl/Database.pm deleted file mode 100644 index e69de29b..00000000