]> dxcluster.net Git - spider.git/commitdiff
add missing set/rbn.pl
authorDirk Koopman <djk@tobit.co.uk>
Thu, 11 Jun 2020 00:20:55 +0000 (01:20 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 11 Jun 2020 00:20:55 +0000 (01:20 +0100)
cmd/set/rbn.pl [new file with mode: 0644]

diff --git a/cmd/set/rbn.pl b/cmd/set/rbn.pl
new file mode 100644 (file)
index 0000000..2f1ff07
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# set user type to 'S' for Spider node
+#
+# Please note that this is only effective if the user is not on-line
+#
+# Copyright (c) 1998 - Dirk Koopman
+#
+#
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+my $user;
+my $create;
+
+return (1, $self->msg('e5')) if $self->priv < 5;
+
+foreach $call (@args) {
+       $call = uc $call;
+       if ($call eq $main::myalias) {
+               push @out, $self->msg('e11', $call);
+               next;
+       }
+       if ($call eq $main::myalias) {
+               push @out, $self->msg('e11', $call);
+               next;
+       }
+       my $chan = DXChannel::get($call);
+       if ($chan) {
+               push @out, $self->msg('nodee1', $call);
+       } else {
+               $user = DXUser::get($call);
+               $create = !$user;
+               $user = DXUser->new($call) if $create;
+               if ($user) {
+                       $user->sort('N');
+                       $user->homenode($main::mycall);
+                       $user->lockout(0);
+                       $user->priv(0) unless $user->priv;
+                       $user->close();
+                       push @out, $self->msg($create ? 'nodenc' : 'noden', $call);
+               } else {
+                       push @out, $self->msg('e3', "Set RBN", $call);
+               }
+       }
+}
+return (1, @out);
+
+
+
+
+
+
+
+
+
+