X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fisolate.pl;fp=cmd%2Fset%2Fisolate.pl;h=b008a9b0bfec2dd99948630de47b1094a6de443a;hb=0f8cb479221e09bae8e03447c78527604cf69be4;hp=0000000000000000000000000000000000000000;hpb=3643ef870e040d437448632209039477eac4e52c;p=spider.git diff --git a/cmd/set/isolate.pl b/cmd/set/isolate.pl new file mode 100644 index 00000000..b008a9b0 --- /dev/null +++ b/cmd/set/isolate.pl @@ -0,0 +1,38 @@ +# +# set isolation for this node +# +# Please note that this is only effective if the user is not on-line +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; +my $user; +my $create; + +return (0) if $self->priv < 9; + +foreach $call (@args) { + $call = uc $call; + 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->isolate(1); + $user->close(); + push @out, $self->msg($create ? 'isoc' : 'iso', $call); + } else { + push @out, $self->msg('e3', "Set/Isolate", $call); + } + } +} +return (1, @out);