From: minima Date: Sun, 23 Feb 2003 19:52:49 +0000 (+0000) Subject: enforce the mutual exclusivity of dxcq, dxitu and usstate X-Git-Tag: PRE-1-52~50 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=f1b5592c74a4bf0723b4e1d8854dbacdd5f7f495;p=spider.git enforce the mutual exclusivity of dxcq, dxitu and usstate --- diff --git a/cmd/set/dxcq.pl b/cmd/set/dxcq.pl index c70ff168..0b6eeb7a 100644 --- a/cmd/set/dxcq.pl +++ b/cmd/set/dxcq.pl @@ -18,6 +18,14 @@ foreach $call (@args) { my $user = DXUser->get_current($call); if ($user) { $user->wantdxcq(1); + if ($user->wantdxitu) { + push @out, $self->msg('dxituu', $call); + $user->wantdxitu(0); + } + if ($user->wantusstate) { + push @out, $self->msg('usstateu', $call); + $user->wantusstate(0); + } $user->put; push @out, $self->msg('dxcqs', $call); } else { diff --git a/cmd/set/dxitu.pl b/cmd/set/dxitu.pl index 7b68a31a..cb8da9d0 100644 --- a/cmd/set/dxitu.pl +++ b/cmd/set/dxitu.pl @@ -18,6 +18,14 @@ foreach $call (@args) { my $user = DXUser->get_current($call); if ($user) { $user->wantdxitu(1); + if ($user->wantdxcq) { + push @out, $self->msg('dxcqu', $call); + $user->wantdxcq(0); + } + if ($user->wantusstate) { + push @out, $self->msg('usstateu', $call); + $user->wantusstate(0); + } $user->put; push @out, $self->msg('dxitus', $call); } else { diff --git a/cmd/set/usstate.pl b/cmd/set/usstate.pl index dd55cac2..7403843b 100644 --- a/cmd/set/usstate.pl +++ b/cmd/set/usstate.pl @@ -20,6 +20,14 @@ foreach $call (@args) { my $user = DXUser->get_current($call); if ($user) { $user->wantusstate(1); + if ($user->wantdxitu) { + push @out, $self->msg('dxituu', $call); + $user->wantdxitu(0); + } + if ($user->wantdxcq) { + push @out, $self->msg('dxcqu', $call); + $user->wantdxcq(0); + } $user->put; push @out, $self->msg('usstates', $call); } else {