'^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',
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 <name>^Create a database entry
+=== 9^DBCREATE <name> chain <name> [<name>..]^Create a chained database entry
+=== 9^DBCREATE <name> remote <node>^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/<dbname>' 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 <dbname> <filename>^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 <dbname>^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 <dbname> <key>^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.
=== 5^SHUTDOWN^Shutdown the cluster
Shutdown the cluster and disconnect all the users
+=== 5^STAT/DB <dbname>^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 [<callsign>]^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 <msgno>^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 [<callsign>]^Show the full status of a user
Shows the full contents of a user record including all the secret flags
and stuff.
+++ /dev/null
-#!/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);
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') {
# qsl requests
if ($doqsl) {
$expr .= " && " if $expr;
- $expr .= "\$f3 =~ m{(QSL|VIA)}io";
+ $expr .= "\$f3 =~ m{(\@|>|QSL|VIA)}io";
}
# iota requests
--- /dev/null
+#
+# 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);
$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',
);
# 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;