1. changed qrz.com address
2. added Charlie's [K1XX] new wpxloc.raw data stuff to get WA1, KC3 type
callsigns to work better.
-3. Merged in the new (faster) DXUser.pm.
+3. added in set/usstate command which prints any US state information
+available on both the spotted (LHS of time) and spotter (RHS of time).
+4. Merged in the new (faster) DXUser.pm.
[NOTE] this version will require Storable to be installed. On the
other hand the code may work without, in a compatible way. This bit hasn't
line 25 it says: $ref = decode($f[1]); you will need to change that to
$ref = asc_decode($f[1]); and then do: perl user_asc
+DO MAKE SURE THAT you include subdirectories in your CVS update
+
21Feb03=======================================================================
1. moved the export of the users file to Wednesday night (GMT) to avoid
possible crashes and/or delays during a contest weekend.
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
+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).
+
+A spotter's state will appear on the RHS of the time (like
+SET/DXGRID) and the spotted's State will appear on the LHS of the
+time field. Any information found will override any locator
+information from SET/DXGRID.
+
+Some user programs cannot cope with this. You can use this command
+to reset (or set) this feature.
+
=== 0^SET/WCY^Allow WCY messages to come out on your terminal
=== 0^UNSET/WCY^Stop WCY messages coming out on your terminal
--- /dev/null
+#
+# set the usstate flag
+#
+# Copyright (c) 2000 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+return (1, $self->msg('db3', 'FCC USDB')) unless $USDB::present;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+ $call = uc $call;
+ my $user = DXUser->get_current($call);
+ if ($user) {
+ $user->wantusstate(1);
+ $user->put;
+ push @out, $self->msg('usstates', $call);
+ } else {
+ push @out, $self->msg('e3', "Set US State", $call);
+ }
+}
+return (1, @out);
--- /dev/null
+#
+# unset the usstate flag
+#
+# Copyright (c) 2003 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+return (1, $self->msg('db3', 'FCC USDB')) unless $USDB::present;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+ $call = uc $call;
+ my $user = DXUser->get_current($call);
+ if ($user) {
+ $user->wantusstate(0);
+ $user->put;
+ push @out, $self->msg('usstateu', $call);
+ } else {
+ push @out, $self->msg('e3', "Unset US State", $call);
+ }
+}
+return (1, @out);
my $t = ztime($_[2]);
+ my $loc;
+ my $clth = $self->{consort} eq 'local' ? 29 : 30;
+ my $comment = substr $_[3], 0, $clth;
+ $comment .= ' ' x ($clth - length($comment));
my $ref = DXUser->get_current($_[4]);
- my $loc = $ref->qra if $ref && $ref->qra && $self->{user}->wantgrid;
- $loc = ' ' . substr($loc, 0, 4) if $loc;
+ if ($ref) {
+ $loc = $ref->qra || '' if $self->{user}->wantgrid;
+ $loc = ' ' . substr($loc, 0, 4) if $loc;
+ }
$loc = "" unless $loc;
- my $buf = sprintf "DX de %-7.7s%11.1f %-12.12s %-*s $t$loc", "$_[4]:", $_[0], $_[1], $self->{consort} eq 'local' ? 29 : 30, $_[3];
+
+ # 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;
+ }
+ }
+
+ my $buf = sprintf "DX de %-7.7s%11.1f %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
+
$buf .= "\a\a" if $self->{beep};
$buf =~ s/\%5E/^/g;
$self->local_send('X', $buf);
wantpc16 => '9,Want Users from node,yesno',
wantsendpc16 => '9,Send PC16,yesno',
wantroutepc19 => '9,Route PC19,yesno',
+ wantusstate => '9,Show US State,yesno',
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
return _want('routepc16', @_);
}
+sub wantusstate
+{
+ return _want('usstate', @_);
+}
+
sub wantlogininfo
{
my $self = shift;
unsethop1 => 'usage: unset/hops <call> ann|spots|wwv|wcy',
unsethop2 => 'hops unset on $_[1] for $_[0]',
usernf => '*** User record for $_[0] not found ***',
+ usstates => 'US State display enabled for $_[0]',
+ usstateu => 'US State display disabled for $_[0]',
wcy1 => '$_[0] is missing or out of range',
wcy2 => 'Duplicate WCY',
wcys => 'WCY enabled for $_[0]',