=== 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.
+=== 0^DX [BY <call>] <freq> <call> <remarks>^Send a DX spot
+This is how you send a DX Spot to other users. You can, in fact, now
+enter the <freq> and the <call> either way round.
+
+ DX FR0G 144.600
+ DX 144.600 FR0G
+ DX 144600 FR0G
+
+will all give the same result. You can add some remarks to the end
+of the command and they will be added to the spot.
+
+ DX FR0G 144600 this is a test
+
+You can credit someone else by saying:-
+
+ DX by G1TLH FR0G 144.600 he isn't on the cluster
+
+The <freq> is compared against the available bands set up in the
+cluster. See SHOW/BANDS for more information.
=== 1^FORWARD/OPERNAME <call>^Send out information on this <call> to all clusters
This command sends out any information held in the user file which can
my @out;
my $valid = 0;
-# first lets see if we think we have a callsign as the first argument
-if (defined @f && @f >= 3 && $f[0] =~ /[A-Za-z]/) {
- $spotter = uc $f[0];
+# do we have at least two args?
+return (1, $self->msg('dx2')) unless @f >= 2;
+
+# as a result of a suggestion by Steve K9AN, I am changing the syntax of
+# 'spotted by' things to "dx by g1tlh <freq> <call>" <freq> and <call>
+# can be in any order
+
+if ($f[0] =~ /^by$/i) {
+ $spotter = uc $f[1];
+ $line =~ s/^\s*$f[0]\s+$f[1]\s+//;
+ shift @f;
+ shift @f;
+ return (1, $self->msg('dx2')) unless @f >= 2;
+}
+
+# get the freq and callsign either way round
+if ($f[0] =~ /[A-Za-z]/) {
+ $spotted = uc $f[0];
$freq = $f[1];
- $spotted = uc $f[2];
- $line =~ s/^$f[0]\s+$f[1]\s+$f[2]\s*//;
-} elsif (defined @f && @f >= 2) {
- $freq = $f[0];
- $spotted = uc $f[1];
- $line =~ s/^$f[0]\s+$f[1]\s*//;
-} elsif (!defined @f || @f < 2) {
+} elsif ($f[0] =~ /^[0-9\.\,]+$/) {
+ $freq = $f[0];
+ $spotted = uc $f[1];
+} else {
return (1, $self->msg('dx2'));
}
+$line =~ s/^$f[0]\s+$f[1]\s*//;
# bash down the list of bands until a valid one is reached
my $bandref;
}
}
-if (!$valid) {
+unless ($valid) {
# try again in MHZ
$freq = $freq * 1000 if $freq;
}
-push @out, $self->msg('dx1', $freq) if !$valid;
+push @out, $self->msg('dx1', $freq) unless $valid;
# check we have a callsign :-)
if ($spotted le ' ') {
$valid = 0;
}
-return (1, @out) if !$valid;
+return (1, @out) unless $valid;
# change ^ into : for transmission
$line =~ s/\^/:/og;
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]',
+ dx1 => 'Frequency $_[0] not in band (see show/band); usage: DX [BY call] freq call comments',
+ dx2 => 'Need a callsign; usage: DX [BY call] freq call comments',
dxs => 'DX Spots flag set on $_[0]',
dxu => 'DX Spots flag unset on $_[0]',
e1 => 'Invalid command',