From: djk Date: Sun, 6 Dec 1998 20:54:59 +0000 (+0000) Subject: added apropos command X-Git-Tag: R_1_8~1 X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=7dfcb79db379b97452ba1bde654a1945718eb7df added apropos command added loads more help upissued version to 1.8 --- diff --git a/Changes b/Changes index 34c5ba28..9d1930af 100644 --- 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======================================================================== diff --git a/cmd/Aliases b/cmd/Aliases index 4136e53c..e187ec88 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -22,6 +22,9 @@ package CmdAlias; %alias = ( + '?' => [ + '^\?', 'help', 'help', + ], a => [ '^ann.*/full', 'announce full', 'announce', '^ann.*/sysop', 'announce sysop', 'announce', diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index 0b4766ed..74f73f7a 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -21,9 +21,44 @@ This will send your announcement cluster wide === 0^ANNOUNCE- is the text of the announcement you wish to broadcast +=== 0^APROPOS ^Search help database for +Search the help database for (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 ^Start a connection to another DX Cluster +Start a connection process that will culminate in a new connection to the +DX cluster . This process creates a new 'client' process which will +use the script in /spider/connect/ to effect the 'chat' exchange +necessary to traverse the network(s) to logon to the cluster . + +=== 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 [ ...]^Disconnect a user or cluster +Disconnect any connected locally + === 0^DX ^Send a DX spot throughout the cluster 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 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 command which will search the help database +for the 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 [ ...]^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 ^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 ^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 ^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 ^Reply to the specified message +=== 0^REPLY PRIVATE ^Reply privately to the specified message +=== 0^REPLY RR ^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 [ ...]^Send a message to one or more callsigns +=== 0^SEND RR ^Send a message and ask for a read receipt +=== 0^SEND COPY ^Send a copy of a message to someone +=== 0^SEND PRIVATE ^Send a personal message +=== 0^SEND NOPRIVATE ^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 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 ^Interrogate the spot database by country This command takes the (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 ^Interrogate the spot database by country +=== 0^SHOW/PREFIX ^Interrogate the prefix database This command takes the (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 ^Send a text message to another station +=== 0^TALK > ^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 ^Send a weather message to local users +=== 0^WX FULL ^Send a weather message to all cluster users +=== 5^WX SYSOP ^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 diff --git a/cmd/apropos.pl b/cmd/apropos.pl index e69de29b..111e9b25 100644 --- a/cmd/apropos.pl +++ b/cmd/apropos.pl @@ -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); diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl index 51ddc696..8bb48ccf 100644 --- a/cmd/disconnect.pl +++ b/cmd/disconnect.pl @@ -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); } } diff --git a/perl/Messages b/perl/Messages index 60eb3c00..74bf3943 100644 --- a/perl/Messages +++ b/perl/Messages @@ -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]', diff --git a/perl/cluster.pl b/perl/cluster.pl index 9c7e3e72..0caade5c 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -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