X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fsendpc16.pl;fp=cmd%2Fset%2Fsendpc16.pl;h=342e99e7b4baa176cf44c8d458f97504a229f674;hb=1006337e105ab06a0e468bc483332fd385dd5240;hp=0000000000000000000000000000000000000000;hpb=22df46c61d3f1ae4115224bcc230ffe7ed6aff99;p=spider.git diff --git a/cmd/set/sendpc16.pl b/cmd/set/sendpc16.pl new file mode 100644 index 00000000..342e99e7 --- /dev/null +++ b/cmd/set/sendpc16.pl @@ -0,0 +1,28 @@ +# +# set the send PC16 flag +# +# Copyright (c) 2002 - 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->wantsendpc16(1); + $user->put; + push @out, $self->msg('wspc16s', $call); + } else { + push @out, $self->msg('e3', "set/sendpc16", $call); + } +} +return (1, @out);