added apropos command
authordjk <djk>
Sun, 6 Dec 1998 20:54:59 +0000 (20:54 +0000)
committerdjk <djk>
Sun, 6 Dec 1998 20:54:59 +0000 (20:54 +0000)
added loads more help
upissued version to 1.8

Changes
cmd/Aliases
cmd/Commands_en.hlp
cmd/apropos.pl
cmd/disconnect.pl
perl/Messages
perl/cluster.pl

diff --git a/Changes b/Changes
index 34c5ba28ccd7d22544bfd31207dcd6a5271052a8..9d1930aff4194c591ba313fc2da663f257919b3c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,7 @@
 4. Changed help system to use just one file per language
 5. Started adding more help
 6. Fixed 24Mhz band limits
+7. Added apropos command and lots of new help text
 05Dec98========================================================================
 1. Added sh/heading and QRA locator calculation stuff
 04Dec98========================================================================
index 4136e53c1693aea00b28a38edaaddfd611bce0e0..e187ec88f3222a741ec88198dfd7efc097911c42 100644 (file)
@@ -22,6 +22,9 @@
 package CmdAlias;
 
 %alias = (
+    '?' => [
+         '^\?', 'help', 'help',
+       ],
     a => [
          '^ann.*/full', 'announce full', 'announce', 
          '^ann.*/sysop', 'announce sysop', 'announce',
index 0b4766ed4c0e32cb0d75e8d081d67bee4f7021ac..74f73f7a9cdd85725a7b5d74ae56939685c6d043 100644 (file)
@@ -21,9 +21,44 @@ This will send your announcement cluster wide
 === 0^ANNOUNCE-
 <text> is the text of the announcement you wish to broadcast 
 
+=== 0^APROPOS <string>^Search help database for <string>
+Search the help database for <string> (it isn't case sensitive), and print
+the names of all the commands that may be relevant.
+
 === 0^BYE^Exit from the cluster
 This will disconnect you from the cluster
-   
+
+=== 5^CONNECT <callsign>^Start a connection to another DX Cluster
+Start a connection process that will culminate in a new connection to the
+DX cluster <callsign>. This process creates a new 'client' process which will
+use the script in /spider/connect/<callsign> to effect the 'chat' exchange
+necessary to traverse the network(s) to logon to the cluster <callsign>.
+
+=== 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.
+
+       perl -d cluster.pl
+
+It will interrupt the cluster just after the debug command has finished.
+=== 0^DIRECTORY^List messages 
+=== 0^DIRECTORY ALL^List all messages
+=== 0^DIRECTORY OWN^List your own messages
+=== 0^DIRECTORY NEW^List your own new messages
+List the messages in the messages directory. 
+
+If there is a 'p' one space after the message number then it is a 
+personal message.
+
+If there is a - after the message number then this indicates that the
+message has been read.
+
+=== 5^DIRECTORY-^
+Sysops can see all users' messages.
+
+=== 8^DISCONNECT <call> [<call> ...]^Disconnect a user or cluster
+Disconnect any <call> connected locally
+
 === 0^DX <freq> <callsign> <remarks>^Send a DX spot throughout the cluster
 <freq> is compared against the available bands set up in the cluster.
 see show/bands for more information.
@@ -36,8 +71,11 @@ HELP is available for a number of commands. The syntax is:-
 Where <cmd> is the name of the command you want help on.
 
 All commands can be abbreviated, so SHOW/DX can be abbreviated
-to SH/DX, ANNOUNCE can be shorted to AN and so on.
+to SH/DX, ANNOUNCE can be shortened to AN and so on.
 
+Look at the APROPOS <string> command which will search the help database
+for the <string> you specify and give you a list of likely commands
+to look at with HELP.
 === 0^SHOW/DX^Interrogate the spot database
 If you just type SHOW/DX you will get the last so many spots
 (sysop configurable, but usually 10).
@@ -68,6 +106,68 @@ e.g.
    SH/DX on 20m info iota
    SH/DX 9a on vhf day 30
 
+=== 0^KILL <msgno> [<msgno> ...]^Remove or erase a message from the system
+You can get rid of any message to or originating from your callsign using 
+this command. You can remove more than one message at a time.
+
+=== 5^KILL-^
+As a sysop you can kill any message on the system.
+
+=== 1^PING <node call>^Find out the delays an a circuit to another node
+This command will enable sysops to determine the speed of an inter-cluster
+node. 
+
+Any visible cluster node can be PINGed.
+
+=== 1^RCMD <node call> <cmd>^Send a command to another DX Cluster
+This command allows you to send nearly any command to another DX Cluster
+node that is connected to the system. 
+
+Whether you get any output is dependant on a) whether the other system knows
+that the node callsign of this cluster is in fact a node b) whether the
+other system is allowing RCMDs from this node and c) whether you have
+permission to send this command at all.
+
+=== 0^READ^Read the next unread personal message addressed to you
+=== 0^READ <msgno>^Read the specified message
+You can read any messages that are sent as 'non-personal' and also any
+message either sent by or sent to your callsign.
+
+=== 5^READ-^
+As a sysop you may read any message on the system
+
+=== 0^REPLY^Reply to the last message that you have read
+=== 0^REPLY <msgno>^Reply to the specified message
+=== 0^REPLY PRIVATE <msgno>^Reply privately to the specified message
+=== 0^REPLY RR <msgno>^Reply to the specified message with read receipt
+You can reply to a message and the subject will automatically have
+"Re:" inserted in front of it, if it isn't already present.
+
+You can also use all the extra qualifiers such as RR, PRIVATE, 
+NOPRIVATE that you can use with the SEND command (see SEND
+for further details)
+
+=== 0^SEND <call> [<call> ...]^Send a message to one or more callsigns
+=== 0^SEND RR <call>^Send a message and ask for a read receipt
+=== 0^SEND COPY <msgno> <call>^Send a copy of a  message to someone
+=== 0^SEND PRIVATE <call>^Send a personal message
+=== 0^SEND NOPRIVATE <call>^Send a message to all stations
+All the SEND commands will create a message which will be sent either to
+an individual callsign or to one of the 'bulletin' addresses. 
+
+SEND <call> on its own acts as though you had typed SEND PRIVATE, that is
+it will mark the message as personal and send it to the cluster node that
+that callsign is connected to.
+
+You can have more than one callsign in all of the SEND commands.
+
+You can have multiple qualifiers so that you can have for example:-
+
+  SEND RR COPY 123 PRIVATE G1TLH G0RDI
+
+which should send a copy of message 123 to G1TLH and G0RDI and you will
+receive a read receipt when they have read the message.
+  
 === 0^SHOW/DXCC <prefix>^Interrogate the spot database by country
 This command takes the <prefix> (which can be a full or partial 
 callsign if desired), looks up which internal country number it is
@@ -79,10 +179,33 @@ e.g.
    SH/DXCC G
    SH/DXCC W on 20m info iota
 
-=== 0^SHOW/PREFIX <callsign>^Interrogate the spot database by country
+=== 0^SHOW/PREFIX <callsign>^Interrogate the prefix database 
 This command takes the <callsign> (which can be a full or partial 
-callsign or a prefix if desired), looks up which internal country number 
+callsign or a prefix), looks up which internal country number 
 it is and then displays all the relevant prefixes for that country
 together with the internal country no, the CQ and ITU regions. 
 
 See also SHOW/DXCC
+
+=== 5^SHUTDOWN^Shutdown the cluster
+Shutdown the cluster and disconnect all the users 
+
+=== 0^TALK <call> <text>^Send a text message to another station
+=== 0^TALK <call> > <node> <text>^Send a text message to another station via a node
+Send a short message to any other station that is visible on the cluster
+system. You can send it to anyone you can see with a SHOW/CONFIGURATION 
+command, they don't have to be connected locally.
+
+The second form of TALK is used when other cluster nodes are connected
+with restricted information. This usually means that they don't send 
+the user information usually associated with loging on and off the cluster.
+
+If you know that G3JNB is likly to be present on GB7TLH, but you can only
+see GB7TLH in the SH/C list but with no users, then you would use the
+second form of the talk message.
+
+=== 0^WX <text>^Send a weather message to local users
+=== 0^WX FULL <text>^Send a weather message to all cluster users
+=== 5^WX SYSOP <text>^Send a weather message to other clusters only
+Weather messages can sometimes be useful if you are experiencing an extreme
+that may indicate enhanced conditions
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..111e9b25292bb4a2ec83946aff25badc7f0e9780 100644 (file)
@@ -0,0 +1,54 @@
+# 
+# the help subsystem
+#
+# apropos - this does a grep on the command file and returns the commands
+# that contain the string searched for
+#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @out;
+
+my $lang = $self->lang;
+$lang = 'en' if !$lang;
+
+my $h = new FileHandle;
+
+if (!open($h, "$main::localcmd/Commands_$lang.hlp")) {
+       if (!open($h, "$main::cmd/Commands_$lang.hlp")) {
+               return (1, $self->msg('helpe1'));
+       }
+}
+my $in;
+
+$line =~ s/\W//og;   # remove dubious characters
+
+my $include;
+my ($priv, $cmd, $desc);
+
+foreach $in (<$h>) {
+       next if $in =~ /^\#/;
+       chomp $in;
+       if ($in =~ /^===/) {
+               push @out, "$cmd $desc" if $include;
+               $include = 0;
+               $in =~ s/=== //;
+               ($priv, $cmd, $desc) = split /\^/, $in;
+               next if $priv > $self->priv;             # ignore subcommands that are of no concern
+               next unless $cmd =~ /$line/i || $desc =~ /$line/i;
+               next if $cmd =~ /-$/o;
+               $include = 1;
+               next;
+       }
+       $include =~ 1 if $cmd =~ /$line/i;
+}
+push @out, "$cmd $desc" if $include;
+
+close($h);
+
+push @out, $self->msg('helpe2', $line) if @out == 0;
+
+return (1, @out);
index 51ddc696e4a54bf62abf593ffff9a552a1531f15..8bb48ccfd5ab5d975f6a6ffaf88fce153ea82f25 100644 (file)
@@ -6,8 +6,8 @@ my @calls = split /\s+/, $line;
 my $call;
 my @out;
 
-if ($self->priv < 9) {
-  return (1, "not allowed");
+if ($self->priv < 8) {
+  return (1, $self->msg('e5'));
 }
 
 foreach $call (@calls) {
@@ -16,13 +16,14 @@ foreach $call (@calls) {
   my $dxchan = DXChannel->get($call);
   if ($dxchan) {
     if ($dxchan->is_ak1a) {
-      $dxchan->send_now("D", DXProt::pc39($main::mycall, 'Disconnected'));
+      $dxchan->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1')));
     } else {
-      $dxchan->disconnect;
+         $dxchan->send_now('D', $self->msg('disc1', $self->call));
        } 
-       push @out, "disconnected $call";
+    $dxchan->disconnect;
+       push @out, $self->msg('disc2', $call);
   } else {
-    push @out, "$call not connected locally";
+    push @out, $self->msg('e10', $call);
   }
 }
 
index 60eb3c00d519f7aa50a196486220fdff79737374..74bf3943389dc8d5175c5d35da80804ec8f50b42 100644 (file)
@@ -21,6 +21,8 @@ package DXM;
                                conscript => 'no connect script called \"$_[0]\" found in $main::root/connect',
                                confail => 'connection to $_[0] failed ($_[1])',
                                constart => 'connection to $_[0] started',
+                               disc1 => 'Disconnected by $_[0]',
+                               disc2 => '$_[0] disconnected',
                                dx1 => 'Frequency $_[0] not in band [usage: DX freq call comments](see sh/band)',
                                dx2 => 'Need a callsign [usage: DX freq call comments]',
                                dxs => 'DX Spots flag set on $_[0]',
@@ -34,6 +36,7 @@ package DXM;
                                e7 => 'callsign $_[0] not visible on the cluster',
                                e8 => 'Need a callsign and some text',
                                e9 => 'Need at least some text',
+                               e10 => '$_[0] not connected locally',
                                email => 'E-mail address set to: $_[0]',
                                helpe1 => 'Help system unavailable, tell sysop',
                                helpe2 => 'No help available on $_[0]',
index 9c7e3e72a36070f77db12e3a28a63bdc0f996780..0caade5c98da91c243181658bc17ce1b58e5c233 100755 (executable)
@@ -48,7 +48,7 @@ package main;
 
 @inqueue = ();                                 # the main input queue, an array of hashes
 $systime = 0;                                  # the time now (in seconds)
-$version = 1.7;                                        # the version no of the software
+$version = 1.8;                                        # the version no of the software
 $starttime = 0;                 # the starting time of the cluster   
  
 # handle disconnections