X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fwantpc9x.pl;fp=cmd%2Fset%2Fwantpc9x.pl;h=a705cc56b57004fa5c6d2c64151b55dfc0263fa4;hb=3065f0dd2c80cd59b7a2b17d397a343b6521b1f4;hp=0000000000000000000000000000000000000000;hpb=eb9befb4de3221e722ab980be65f24f4d588870a;p=spider.git diff --git a/cmd/set/wantpc9x.pl b/cmd/set/wantpc9x.pl new file mode 100644 index 00000000..a705cc56 --- /dev/null +++ b/cmd/set/wantpc9x.pl @@ -0,0 +1,28 @@ +# +# set the wantPC9x flag +# +# Copyright (c) 2007 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, uc $line; +my $call; +my @out; + +return (1, $self->msg('e5')) if $self->priv < 9; + +foreach $call (@args) { + return (1, $self->msg('e12')) unless is_callsign($call); + + my $user = DXUser->get_current($call); + if ($user) { + $user->wantpc9x(1); + $user->put; + push @out, $self->msg('wpc9xs', $call); + } else { + push @out, $self->msg('e3', "set/wantpc9x", $call); + } +} +return (1, @out);