06Dec98========================================================================
1. Fixed DXBearing::is_qra so that it correctly detects full QRA locators
-2. Added a QRA locator thing to sh/heading so that if the 'prefix' looks like
-a locator it will print the bearing and distance to it (as well as doing the
-normal sh/heading on a prefix thing).
+2. Added sh/qra for doing locator distances and bearings
+3. Added some stuff to Notes.txt on hints for command writers
+4. Changed help system to use just one file per language
+5. Started adding more help
+6. Fixed 24Mhz band limits
05Dec98========================================================================
1. Added sh/heading and QRA locator calculation stuff
04Dec98========================================================================
--- /dev/null
+#
+# please put your help in in alphabetical order
+#
+# a string search is done in the command field (case is ignored)
+# and all commands matching the asked for command are printed out
+#
+# the order of the fields in each header is
+# privilege, command, Description
+# if the command ends in a - then that line isn't printed, but any
+# subsequent lines are
+#
+# Comment lines are indented before printing
+#
+=== 0^ANNOUNCE <text>^Send an announcement to LOCAL users only
+
+=== 0^ANNOUNCE FULL <text>^Send an announcement cluster wide
+This will send your announcement cluster wide
+
+=== 5^ANNOUNCE SYSOP <text>^Send an announcement to Sysops only
+
+=== 0^ANNOUNCE-
+<text> is the text of the announcement you wish to broadcast
+
+=== 0^BYE^Exit from the cluster
+This will disconnect you from the cluster
+
+=== 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.
+
+=== 0^HELP^The HELP Command
+HELP is available for a number of commands. The syntax is:-
+
+ HELP <cmd>
+
+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.
+
+=== 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).
+
+In addition you can add any number of these commands in very nearly
+any order to the basic SHOW/DX command, they are:-
+
+on <band> - eg 160m 20m 2m 23cm 6mm
+on <region> - eg hf vhf uhf shf (see SHOW/BANDS)
+
+<number> - the number of spots you want
+<from>-<to> - <from> spot no <to> spot no in the selected list
+
+<prefix> - for a spotted callsign beginning with <prefix>
+*<suffix> - for a spotted callsign ending in <suffix>
+*<string>* - for a spotted callsign containing <string>
+
+day <number> - starting <number> days ago
+day <from>-<to> - <from> days <to> days ago
+
+info <text> - any spots containing <text> in the info or remarks
+
+spotter <call> - any spots spotted by <call>
+
+e.g.
+
+ SH/DX 9m0
+ SH/DX on 20m info iota
+ SH/DX 9a on vhf day 30
+
+=== 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
+and then displays all the spots as per SH/DX for that country.
+
+The options for SHOW/DX also apply to this command.
+e.g.
+
+ SH/DXCC G
+ SH/DXCC W on 20m info iota
+
+=== 0^SHOW/PREFIX <callsign>^Interrogate the spot database by country
+This command takes the <callsign> (which can be a full or partial
+callsign or a prefix if desired), 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
* The normal privilege levels are:-
0 - user privilege.
+ 1 - remote user user privilege
5 - sysop privilege.
+ 8 - maximum recommended remote sysop privilege
9 - console privilege.
The sysop privilege is for things that you are prepared for remote
you can have one callsign, you can have several. Interpret your
arguments; so for example:-
- set/locator jo02lq - sets your own locator to JO02LQ
- set/locator g1tlh jo02lq - sets G1TLH's locator (if you are allowed)
+ set/qra jo02lq - sets your own locator to JO02LQ
+ set/qra g1tlh jo02lq - sets G1TLH's locator (if you are allowed)
or
- show/locator - displays your locator (and other info?)
- show/locator in92jo - displays the bearing and distance to
- IN92JO using your lat/long or locator
- show/locator jn56in in92jo - bearing and distance between two
- locators
- show/locator gb7dxc - bearing and distance to gb7dxc if poss.
+ show/qra in92jo - displays the bearing and distance to
+ IN92JO using your lat/long or locator
+ show/qra jn56in in92jo - bearing and distance between two
+ locators
* It is important that you remember when you have tie hashes using MLDBM
et al. If you do a DXUser->get($call) you will get a different (older)
thing than the one in $self->$user. This is almost certainly NOT what
you want if want to modify a user that is currently connected.
+* If you want to debug something, start the cluster.pl up thus:-
+
+ perl -d cluster.pl
+ dbg> r
+
+ Then you can go into debug mode at anytime by using the command :-
+
+ debug
+
+ or you can put the line:-
+
+ $DB::single = 1;
+
+ in an appropriate place in a command. This will only have an effect
+ if you are running in perl debug mode.
+
* Anything you output with a > as the last character is taken to mean
that this is a prompt and will not have a \r or \n appended to it.
have a '.hlp' appended to the command name rather than a '.pl'. All
in the help file are sent to the user except those starting with a '#'
character.
+
+* PLEASE add your new commands to the Commands_*.hlp file so that
+ people know about and how to use them!
+++ /dev/null
-=== 0^EN^ANNOUNCE^Send an announcement to the local cluster users
- ANNOUNCE <text>
-
- <text> is the text of the announcement you wish to broadcast
-
-=== 0^EN^ANNOUNCE FULL^Send an announcement to all cluster users
- ANNOUNCE FULL <text>
-=== 5^EN^ANNOUNCE SYSOP^Send an announcement to sysops
- ANNOUNCE SYSOP <text>
+++ /dev/null
-=== 0^EN^BYE^Exit from the cluster
- BYE
-
- This will disconnect you from the cluster
-
+++ /dev/null
-=== 0^EN^DX^Send a DX spot throughout the cluster
- DX <freq> <callsign> <remarks>
- or
- DX <spotter> <freq> <callsign> <remarks>
-
- Use the second form only if you wish to credit the spot to someone
- else.
+++ /dev/null
-=== 0^EN^HELP^The HELP Command
-HELP is available for a number of commands. The syntax is:-
-
- HELP <cmd>
-
-Where <cmd> is the name of the command you want help on.
-
-Commands for which help is available:-
-
-=== 0^EN^ANNOUNCE^make an announcement to the cluster
-=== 0^EN^BYE^exit from the cluster
-=== 9^EN^CREATE^Create various things
-=== 9^EN^DELETE^Delete various things
-=== 9^EN^DISCONNECT^Disconnect a user or node from the cluster
-=== 0^EN^DX^send a DX spot to the cluster
-=== 0^EN^SET^set various parameters
-=== 0^EN^SHOW^show various parameters
-=== 5^EN^SHUTDOWN^shutdown this node completely
-=== 5^EN^STAT^show the status of various system related things
-=== 0^EN^TALK^talk to another user of the cluster
-=== 0^EN^UNSET^unset or reset various parameters
-=== 0^EN^WWV^send a WWV spot
-=== 0^EN^WX^send a weather announcement to the cluster
# the help subsystem
#
# It is a very simple system in that you type in 'help <cmd>' and it
-# looks for a file called <cmd>.hlp in either the local_cmd directory
+# looks for a file called command.hlp in either the local_cmd directory
# or the cmd directory (in that order).
#
-# if you just type in 'help' by itself you get what is in 'help.hlp'.
-#
# Copyright (c) 1998 - Dirk Koopman G1TLH
#
# $Id$
my ($self, $line) = @_;
my @out;
-my ($path, $fcmd) = ($main::cmd, "help");;
-my @out;
-my @inpaths = ($main::localcmd, $main::cmd);
-my @helpfiles;
# this is naff but it will work for now
$line = "help" if !$line;
-$fcmd = lc $line;
+my $lang = $self->lang;
+$lang = 'en' if !$lang;
-# each help file starts with a line that looks like:-
+# each help file contains lines that looks like:-
+#
+# === 0^EN^*^Description
+# text
+# text
#
-# === 0^EN^HELP^Description
+# === 0^EN^help^Description
# text
# text
# text
# The fields are:- privilege level, Language, full command name, short description
#
-if (!open(H, "$path/$fcmd.hlp")) {
- return (1, "no help on $line available");
+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;
-my $include = 0;
-my @in = <H>;
-close(H);
-
-foreach $in (@in) {
- next if $in =~ /^\s*\#/;
- chomp $in;
- if ($in =~ /^===/) {
- $include = 0;
- $in =~ s/=== //;
- my ($priv, $lang, $cmd, $desc) = split /\^/, $in;
- next if $priv > $self->priv; # ignore subcommands that are of no concern
- next if $self->lang && $self->lang ne $lang;
- push @out, "$cmd - $desc";
- $include = 1;
- next;
- }
- push @out, $in if $include;
+
+$line =~ s/![\w\/]//og;
+$line =~ s/\//\.\*\//og;
+
+my $include;
+foreach $in (<$h>) {
+ next if $in =~ /^\#/;
+ chomp $in;
+ if ($in =~ /^===/) {
+ $include = 0;
+ $in =~ s/=== //;
+ my ($priv, $cmd, $desc) = split /\^/, $in;
+ next if $priv > $self->priv; # ignore subcommands that are of no concern
+ next unless $cmd =~ /$line/i;
+ push @out, "$cmd $desc" unless $cmd =~ /-$/o;
+ $include = 1;
+ next;
+ }
+ push @out, " $in" if $include;
}
-push @out, "No help available for $line" if @out == 0;
+close($h);
+
+push @out, $self->msg('helpe2', $line) if @out == 0;
return (1, @out);
+++ /dev/null
-=== 0^EN^SHOW/DX^Interrogate the spot database
- SHOW/DX
-
- If you just type SHOW/DX you will get the last so many spots
- (sysop configurable, but usually 10).
-
- In addition you can add any number of these commands in very nearly
- any order to the basic SHOW/DX command, they are:-
-
- on <band> - eg 160m 20m 2m 23cm 6mm
- on <region> - eg hf vhf uhf shf
-
- <number> - the number of spots you want
- <from>-<to> - <from> spot no <to> spot no in the selected list
-
- <prefix> - for a spotted callsign beginning with <prefix>
- *<suffix> - for a spotted callsign ending in <suffix>
- *<string>* - for a spotted callsign containing <string>
-
- day <number> - starting <number> days ago
- day <from>-<to> - <from> days <to> days ago
-
- info <text> - any spots containing <text> in the info or remarks
-
- spotter <call> - any spots spotted by <call>
-
- e.g.
-
- SH/DX 9m0
- SH/DX on 20m info iota
- SH/DX 9a on vhf day 30
- See also SHOW/DXCC
+++ /dev/null
-=== 0^EN^SHOW/DXCC^Interrogate the spot database by country
- SHOW/DXCC <prefix>
-
- This command takes the <prefix> (which can be a full or partial
- callsign if desired), looks up which internal country number it is
- and then displays all the spots as per SH/DX for that country.
-
- In addition you can add any number of these commands in very nearly
- any order to the basic SHOW/DXCC command, they are:-
-
- on <band> - eg 160m 20m 2m 23cm 6mm
- on <region> - eg hf vhf uhf shf
-
- <number> - the number of spots you want
- <from>-<to> - <from> spot no <to> spot no in the selected list
-
- day <number> - starting <number> days ago
- day <from>-<to> - <from> days <to> days ago
-
- info <text> - any spots containing <text> in the info or remarks
-
- spotter <call> - any spots spotted by <call>
-
- e.g.
-
- SH/DX G
- SH/DX W on 20m info iota
- See also SHOW/DXCC
+++ /dev/null
-=== 0^EN^SHOW/PREFIX^Interrogate the spot database by country
- SHOW/PREFIX <prefix> or <callsign>
-
- This command takes the <prefix> (which can be a full or partial
- callsign if desired), 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.
ssb => [ 21151, 21450]
}, 'Bands'),
- '12m' => bless( { band => [ 21000, 21450 ],
- cw => [ 21000, 21150 ],
- data => [ 21100, 21120 ],
- ssb => [ 21151, 21450]
+ '12m' => bless( { band => [ 24890, 24990 ],
+ cw => [ 24890, 24990 ],
+ ssb => [ 24920, 24930],
+ rtty => [ 24930, 24990],
}, 'Bands'),
e8 => 'Need a callsign and some text',
e9 => 'Need at least some text',
email => 'E-mail address set to: $_[0]',
+ helpe1 => 'Help system unavailable, tell sysop',
+ helpe2 => 'No help available on $_[0]',
heres => 'Here set on $_[0]',
heade1 => 'Using $main::mycall Coords, consider doing a set/location or set/qra',
hereu => 'Here unset on $_[0]',