From 6ee86589ded6e313ddb9bb748d8ba751a760692b Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 3 Mar 2001 14:23:36 +0000 Subject: [PATCH] add missing set/unset wcy commands --- cmd/set/wcy.pl | 27 +++++++++++++++++++++++++++ cmd/unset/wcy.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 cmd/set/wcy.pl create mode 100644 cmd/unset/wcy.pl diff --git a/cmd/set/wcy.pl b/cmd/set/wcy.pl new file mode 100644 index 00000000..47461127 --- /dev/null +++ b/cmd/set/wcy.pl @@ -0,0 +1,27 @@ +# +# set the wcy flag +# +# Copyright (c) 2001 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; + +@args = $self->call if (!@args || $self->priv < 9); + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + $chan->wcy(1); + $chan->user->wantwcy(1); + push @out, $self->msg('wcys', $call); + } else { + push @out, $self->msg('e3', "Set WCY", $call); + } +} +return (1, @out); diff --git a/cmd/unset/wcy.pl b/cmd/unset/wcy.pl new file mode 100644 index 00000000..965a3d37 --- /dev/null +++ b/cmd/unset/wcy.pl @@ -0,0 +1,27 @@ +# +# unset the wcy flag +# +# Copyright (c) 2001 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; + +@args = $self->call if (!@args || $self->priv < 9); + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + $chan->wcy(0); + $chan->user->wantwcy(0); + push @out, $self->msg('wcyu', $call); + } else { + push @out, $self->msg('e3', "Unset WCY", $call); + } +} +return (1, @out); -- 2.43.0