]> dxcluster.net Git - spider.git/blob - cmd/set/dxcq.pl
89c1a9c7e539d4b62066ca8b1830795f7620fbd1
[spider.git] / cmd / set / dxcq.pl
1 #
2 # set the dxdxcq flag
3 #
4 # Copyright (c) 2000 - Dirk Koopman
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my @args = split /\s+/, $line;
11 my $call;
12 my @out;
13
14 @args = $self->call if (!@args || $self->priv < 9);
15
16 foreach $call (@args) {
17         $call = uc $call;
18         my $user = DXUser->get_current($call);
19         if ($user) {
20                 $user->wantdxcq(1);
21                 if ($user->wantdxitu) {
22                         push @out, $self->msg('dxituu', $call);
23                         $user->wantdxitu(0);
24                 }
25                 if ($user->wantusstate) {
26                         push @out, $self->msg('usstateu', $call);
27                         $user->wantusstate(0);
28                 }
29                 $user->put;
30                 push @out, $self->msg('dxcqs', $call);
31         } else {
32                 push @out, $self->msg('e3', "Set DX CQ", $call);
33         }
34 }
35 return (1, @out);