RBN now with basic spots
[spider.git] / cmd / set / wantrbn.pl
diff --git a/cmd/set/wantrbn.pl b/cmd/set/wantrbn.pl
new file mode 100644 (file)
index 0000000..f4aa86e
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# set the want rbn (at all)
+#
+# Copyright (c) 2020 - Dirk Koopman
+#
+#
+#
+
+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 $user = DXUser::get_current($call);
+       if ($user) {
+               $user->wantrbn(1);
+               $user->put;
+               push @out, $self->msg('wante', 'RBN', $call);
+       } else {
+               push @out, $self->msg('e3', "Set wantrbn", $call);
+       }
+}
+return (1, @out);