From 3fc0f2823c2505b08730286880ad8738963bca17 Mon Sep 17 00:00:00 2001 From: minima Date: Sun, 23 Feb 2003 14:41:56 +0000 Subject: [PATCH] add set/dxcq and set/dxitu commands --- Changes | 4 +++- cmd/Commands_en.hlp | 34 ++++++++++++++++++++++++++++++++-- cmd/set/dxcq.pl | 27 +++++++++++++++++++++++++++ cmd/set/dxitu.pl | 27 +++++++++++++++++++++++++++ cmd/show/db0sdx.pl | 4 ++++ cmd/unset/dxcq.pl | 27 +++++++++++++++++++++++++++ cmd/unset/dxitu.pl | 27 +++++++++++++++++++++++++++ perl/DXCommandmode.pm | 21 +++++++++++---------- perl/DXUser.pm | 18 +++++++++++++++--- perl/Messages | 4 ++++ 10 files changed, 177 insertions(+), 16 deletions(-) create mode 100644 cmd/set/dxcq.pl create mode 100644 cmd/set/dxitu.pl create mode 100644 cmd/unset/dxcq.pl create mode 100644 cmd/unset/dxitu.pl diff --git a/Changes b/Changes index e85c6748..4f4800c5 100644 --- 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). -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 diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index c6cac236..6a513198 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -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/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 @@ -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. +Conflicts with: SHOW/DXCQ, SHOW/DXITU + +Do a STAT/USER to see which flags you have set if you are confused. + === 5^SET/DXNET [..]^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 -=== 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). @@ -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. +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 diff --git a/cmd/set/dxcq.pl b/cmd/set/dxcq.pl new file mode 100644 index 00000000..c70ff168 --- /dev/null +++ b/cmd/set/dxcq.pl @@ -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 index 00000000..7b68a31a --- /dev/null +++ b/cmd/set/dxitu.pl @@ -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); diff --git a/cmd/show/db0sdx.pl b/cmd/show/db0sdx.pl index 2c570044..c90ecf97 100644 --- a/cmd/show/db0sdx.pl +++ b/cmd/show/db0sdx.pl @@ -20,6 +20,8 @@ my $cmdprompt = '/query->.*$/'; my($info, $t); $t = new Net::Telnet; + +dbg("db0sdx: contacting $target:$port") if isdbg('db0sdx'); $info = $t->open(Host => $target, Port => $port, Timeout => 15); @@ -28,6 +30,8 @@ if (!$info) { push @out, $self->msg('e18', 'DB0SDX Database server'); } else { + dbg("db0sdx: connected to $target:$port") if isdbg('db0sdx'); + my $s = qq( diff --git a/cmd/unset/dxcq.pl b/cmd/unset/dxcq.pl new file mode 100644 index 00000000..229c1289 --- /dev/null +++ b/cmd/unset/dxcq.pl @@ -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 index 00000000..a3236f52 --- /dev/null +++ b/cmd/unset/dxitu.pl @@ -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); diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index f9d9c9f0..5f8256e9 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -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; @@ -825,16 +827,15 @@ sub dx_spot } $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; diff --git a/perl/DXUser.pm b/perl/DXUser.pm index 0522cf2d..5e44a11f 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -76,14 +76,16 @@ $v3 = 0; 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', - 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', - 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', @@ -675,6 +677,16 @@ sub wantusstate return _want('usstate', @_); } +sub wantdxcq +{ + return _want('dxcq', @_); +} + +sub wantdxitu +{ + return _want('dxitu', @_); +} + sub wantlogininfo { my $self = shift; diff --git a/perl/Messages b/perl/Messages index 45f281b6..250340bf 100644 --- a/perl/Messages +++ b/perl/Messages @@ -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', + 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', -- 2.43.0