add set/dxcq and set/dxitu commands
authorminima <minima>
Sun, 23 Feb 2003 14:41:56 +0000 (14:41 +0000)
committerminima <minima>
Sun, 23 Feb 2003 14:41:56 +0000 (14:41 +0000)
Changes
cmd/Commands_en.hlp
cmd/set/dxcq.pl [new file with mode: 0644]
cmd/set/dxitu.pl [new file with mode: 0644]
cmd/show/db0sdx.pl
cmd/unset/dxcq.pl [new file with mode: 0644]
cmd/unset/dxitu.pl [new file with mode: 0644]
perl/DXCommandmode.pm
perl/DXUser.pm
perl/Messages

diff --git a/Changes b/Changes
index e85c67480ff2a7a70c8cd826c9d96ea80dd629fa..4f4800c52d9525834ec64a89595a59eef653f292 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,9 @@
 23Feb03=======================================================================
 1. Added show/wm7d command (a US only callbook server) [by K1XX].
 2. Added a prototype show/db0sdx command (w.i.p).
 23Feb03=======================================================================
 1. Added show/wm7d command (a US only callbook server) [by K1XX].
 2. Added a prototype show/db0sdx command (w.i.p).
-3. Add new Commands to manuals (g0vgs)
+3. Added set/dxcq and set/dxitu zone commands [Translators: I have added
+dxcqu, dxcqs, dxitus and dxituu to Messages].
+4. Add new Commands to manuals (g0vgs)
 22Feb03=======================================================================
 1. changed qrz.com address 
 2. added Charlie's [K1XX] new wpxloc.raw data stuff to get WA1, KC3 type 
 22Feb03=======================================================================
 1. changed qrz.com address 
 2. added Charlie's [K1XX] new wpxloc.raw data stuff to get WA1, KC3 type 
index c6cac236d2bcc8dada517ceeeec9e14bd246a2cd..6a5131980a17849bd3052ad3d15f1083397bc58e 100644 (file)
@@ -1403,6 +1403,28 @@ You can show what levels you are logging with SHOW/DEBUG
 === 0^SET/DX^Allow DX messages to come out on your terminal
 === 0^UNSET/DX^Stop DX messages coming out on your terminal
 
 === 0^SET/DX^Allow DX messages to come out on your terminal
 === 0^UNSET/DX^Stop DX messages coming out on your terminal
 
+=== 0^SET/DXCQ^Show CQ Zones on the end of DX announcements
+=== 0^UNSET/DXCQ^Stop CQ Zones on the end of DX announcements
+Display both the Spotter's and the Spotted's CQ Zone on the end
+of a DX announcement (there is just enough room). Some user programs
+cannot cope with this. The Spotter's CQ is on the RHS of the 
+time, the Spotted's CQ is on the LHS.
+
+Conflicts with: SHOW/DXGRID, SHOW/DXITU, SHOW/USSTATE
+
+Do a STAT/USER to see which flags you have set if you are confused.  
+
+=== 0^SET/DXITU^Show ITU Zones on the end of DX announcements
+=== 0^UNSET/DXITU^Stop ITU Zones on the end of DX announcements
+Display both the Spotter's and the Spotted's ITU Zone on the end
+of a DX announcement (there is just enough room). Some user programs
+cannot cope with this. The Spotter's ITU is on the RHS of the 
+time, the Spotted's ITU is on the LHS.
+
+Conflicts with: SHOW/DXGRID, SHOW/DXCQ, SHOW/USSTATE
+
+Do a STAT/USER to see which flags you have set if you are confused.  
+
 === 0^SET/DXGRID^Allow QRA Grid Squares on the end of DX announcements
 === 0^UNSET/DXGRID^Stop QRA Grid Squares on the end of DX announcements
 A standard feature which is enabled in version 1.43 and above is 
 === 0^SET/DXGRID^Allow QRA Grid Squares on the end of DX announcements
 === 0^UNSET/DXGRID^Stop QRA Grid Squares on the end of DX announcements
 A standard feature which is enabled in version 1.43 and above is 
@@ -1411,6 +1433,10 @@ of a DX announcement (there is just enough room). Some user programs
 cannot cope with this. You can use this command to reset (or set)
 this feature.
 
 cannot cope with this. You can use this command to reset (or set)
 this feature.
 
+Conflicts with: SHOW/DXCQ, SHOW/DXITU
+
+Do a STAT/USER to see which flags you have set if you are confused.  
+
 === 5^SET/DXNET <call> [<call>..]^Make the callsign an DXNet node
 
 === 0^SET/ECHO^Make the cluster echo your input
 === 5^SET/DXNET <call> [<call>..]^Make the callsign an DXNet node
 
 === 0^SET/ECHO^Make the cluster echo your input
@@ -1668,8 +1694,8 @@ overwritten by any weekly updates that affect this callsign
 
 see also DELETE/USDB
 
 
 see also DELETE/USDB
 
-=== 0^SET/DXSTATE^Allow US State info on the end of DX announcements
-=== 0^UNSET/DXSTATE^Stop US State info on the end of DX announcements
+=== 0^SET/USSTATE^Allow US State info on the end of DX announcements
+=== 0^UNSET/USSTATE^Stop US State info on the end of DX announcements
 If the spotter's or spotted's US State is known it is output on the 
 end of a DX announcement (there is just enough room). 
 
 If the spotter's or spotted's US State is known it is output on the 
 end of a DX announcement (there is just enough room). 
 
@@ -1681,6 +1707,10 @@ information from SET/DXGRID.
 Some user programs cannot cope with this. You can use this command 
 to reset (or set) this feature.
 
 Some user programs cannot cope with this. You can use this command 
 to reset (or set) this feature.
 
+Conflicts with: SHOW/DXCQ, SHOW/DXITU
+
+Do a STAT/USER to see which flags you have set if you are confused.  
+
 === 0^SET/WCY^Allow WCY messages to come out on your terminal
 === 0^UNSET/WCY^Stop WCY messages coming out on your terminal
 
 === 0^SET/WCY^Allow WCY messages to come out on your terminal
 === 0^UNSET/WCY^Stop WCY messages coming out on your terminal
 
diff --git a/cmd/set/dxcq.pl b/cmd/set/dxcq.pl
new file mode 100644 (file)
index 0000000..c70ff16
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# set the dxdxcq flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantdxcq(1);
+               $user->put;
+               push @out, $self->msg('dxcqs', $call);
+       } else {
+               push @out, $self->msg('e3', "Set DX CQ", $call);
+       }
+}
+return (1, @out);
diff --git a/cmd/set/dxitu.pl b/cmd/set/dxitu.pl
new file mode 100644 (file)
index 0000000..7b68a31
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# set the dxitu flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantdxitu(1);
+               $user->put;
+               push @out, $self->msg('dxitus', $call);
+       } else {
+               push @out, $self->msg('e3', "Set DX ITU", $call);
+       }
+}
+return (1, @out);
index 2c5700448d7beb454f404650d4d2fc2edb48f64e..c90ecf976215f810ed64f30c520437509ee6dd3b 100644 (file)
@@ -20,6 +20,8 @@ my $cmdprompt = '/query->.*$/';
 my($info, $t);
                                     
 $t = new Net::Telnet;
 my($info, $t);
                                     
 $t = new Net::Telnet;
+
+dbg("db0sdx: contacting $target:$port") if isdbg('db0sdx');
 $info =  $t->open(Host    => $target,
                  Port    => $port,
                  Timeout => 15);
 $info =  $t->open(Host    => $target,
                  Port    => $port,
                  Timeout => 15);
@@ -28,6 +30,8 @@ if (!$info) {
        push @out, $self->msg('e18', 'DB0SDX Database server');
 } else {
 
        push @out, $self->msg('e18', 'DB0SDX Database server');
 } else {
 
+       dbg("db0sdx: connected to $target:$port") if isdbg('db0sdx');
+
        my $s = qq(<?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
        my $s = qq(<?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
diff --git a/cmd/unset/dxcq.pl b/cmd/unset/dxcq.pl
new file mode 100644 (file)
index 0000000..229c128
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# unset the dxdxcq flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantdxcq(0);
+               $user->put;
+               push @out, $self->msg('dxcqu', $call);
+       } else {
+               push @out, $self->msg('e3', "Unset DX CQ", $call);
+       }
+}
+return (1, @out);
diff --git a/cmd/unset/dxitu.pl b/cmd/unset/dxitu.pl
new file mode 100644 (file)
index 0000000..a3236f5
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# unset the dxdxitu flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantdxitu(0);
+               $user->put;
+               push @out, $self->msg('dxituu', $call);
+       } else {
+               push @out, $self->msg('e3', "Unset DX ITU", $call);
+       }
+}
+return (1, @out);
index f9d9c9f08b53f8b4c458f572457d7f59ed6a06c4..5f8256e93d1ff449b39c9ad62ee99903735c6b88 100644 (file)
@@ -813,6 +813,8 @@ sub dx_spot
        }
 
 
        }
 
 
+       dbg('spot: "' . join('","', @_) . '"') if isdbg('dxspot');
+       
        my $t = ztime($_[2]);
        my $loc;
        my $clth = $self->{consort} eq 'local' ? 29 : 30;
        my $t = ztime($_[2]);
        my $loc;
        my $clth = $self->{consort} eq 'local' ? 29 : 30;
@@ -825,16 +827,15 @@ sub dx_spot
        } 
        $loc = "" unless $loc;
 
        } 
        $loc = "" unless $loc;
 
-       # USDB stuff
-       if ($USDB::present && $self->{user}->wantusstate) {
-               my ($city, $state) = USDB::get($_[4]);
-               if ($state) {
-                       $loc = ' ' . $state;
-               }
-               ($city, $state) = USDB::get($_[1]);
-               if ($state) {
-                       $comment = substr($comment, 0,  $self->{consort} eq 'local' ? 26 : 27) . ' ' . $state; 
-               }
+       if ($self->{user}->wantdxitu) {
+               $loc = ' ' . sprintf("%2d", $_[10]) if defined $_[10];
+               $comment = substr($comment, 0,  $self->{consort} eq 'local' ? 26 : 27) . ' ' . sprintf("%2d", $_[8]) if defined $_[8]; 
+       } elsif ($self->{user}->wantdxcq) {
+               $loc = ' ' . sprintf("%2d", $_[11]) if defined $_[11];
+               $comment = substr($comment, 0,  $self->{consort} eq 'local' ? 26 : 27) . ' ' . sprintf("%2d", $_[9]) if defined $_[9]; 
+       } elsif ($self->{user}->wantusstate) {
+               $loc = ' ' . $_[13] if $_[13];
+               $comment = substr($comment, 0,  $self->{consort} eq 'local' ? 26 : 27) . ' ' . $_[12] if $_[12]; 
        }
 
        my $buf = sprintf "DX de %-7.7s%11.1f  %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
        }
 
        my $buf = sprintf "DX de %-7.7s%11.1f  %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
index 0522cf2da2d6ade1dd3d6986434eb6769e37e040..5e44a11f9e0b3d3fb884392cc3fe4e30c32e4f39 100644 (file)
@@ -76,14 +76,16 @@ $v3 = 0;
                  pingint => '9,Node Ping interval',
                  nopings => '9,Ping Obs Count',
                  wantlogininfo => '9,Login info req,yesno',
                  pingint => '9,Node Ping interval',
                  nopings => '9,Ping Obs Count',
                  wantlogininfo => '9,Login info req,yesno',
-          wantgrid => '0,DX Grid Info,yesno',
+          wantgrid => '0,Show DX Grid,yesno',
                  wantann_talk => '0,Talklike Anns,yesno',
                  wantpc90 => '1,Req PC90,yesno',
                  wantann_talk => '0,Talklike Anns,yesno',
                  wantpc90 => '1,Req PC90,yesno',
-                 wantnp => '1,Req New Protocol,yesno',
+                 wantnp => '1,Req New Proto,yesno',
                  wantpc16 => '9,Want Users from node,yesno',
                  wantsendpc16 => '9,Send PC16,yesno',
                  wantroutepc19 => '9,Route PC19,yesno',
                  wantpc16 => '9,Want Users from node,yesno',
                  wantsendpc16 => '9,Send PC16,yesno',
                  wantroutepc19 => '9,Route PC19,yesno',
-                 wantusstate => '9,Show US State,yesno',
+                 wantusstate => '0,Show US State,yesno',
+                 wantdxcq => '0,Show CQ Zone,yesno',
+                 wantdxitu => '0,Show ITU Zone,yesno',
                  lastoper => '9,Last for/oper,cldatetime',
                  nothere => '0,Not Here Text',
                  registered => '9,Registered?,yesno',
                  lastoper => '9,Last for/oper,cldatetime',
                  nothere => '0,Not Here Text',
                  registered => '9,Registered?,yesno',
@@ -675,6 +677,16 @@ sub wantusstate
        return _want('usstate', @_);
 }
 
        return _want('usstate', @_);
 }
 
+sub wantdxcq
+{
+       return _want('dxcq', @_);
+}
+
+sub wantdxitu
+{
+       return _want('dxitu', @_);
+}
+
 sub wantlogininfo
 {
        my $self = shift;
 sub wantlogininfo
 {
        my $self = shift;
index 45f281b6307e5cecc967f23e83286ae05f692995..250340bf946c4a6adea46a8cb485c6b4a2132d2a 100644 (file)
@@ -52,6 +52,10 @@ package DXM;
                                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',
                                dx3 => 'The callsign or frequency is invalid',
                                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',
                                dx3 => 'The callsign or frequency is invalid',
+                               dxcqs => 'DX CQ Zones enabled for $_[0]',
+                               dxcqu => 'DX CQ Zones disabled for $_[0]',
+                               dxitus => 'DX ITU Zones enabled for $_[0]',
+                               dxituu => 'DX ITU Zones disabled for $_[0]',
                                dxs => 'DX Spots enabled for $_[0]',
                                dxu => 'DX Spots disabled for $_[0]',
                                e1 => 'Invalid command',
                                dxs => 'DX Spots enabled for $_[0]',
                                dxu => 'DX Spots disabled for $_[0]',
                                e1 => 'Invalid command',