added US State information on DX Spots
[spider.git] / cmd / set / usstate.pl
1 #
2 # set the usstate flag
3 #
4 # Copyright (c) 2000 - Dirk Koopman
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my @args = split /\s+/, $line;
11 my $call;
12 my @out;
13
14 return (1, $self->msg('db3', 'FCC USDB')) unless $USDB::present;
15
16 @args = $self->call if (!@args || $self->priv < 9);
17
18 foreach $call (@args) {
19         $call = uc $call;
20         my $user = DXUser->get_current($call);
21         if ($user) {
22                 $user->wantusstate(1);
23                 $user->put;
24                 push @out, $self->msg('usstates', $call);
25         } else {
26                 push @out, $self->msg('e3', "Set US State", $call);
27         }
28 }
29 return (1, @out);