X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fisolate.pl;h=893c204ca0f4397ad8609be5f956acc89795973c;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=b008a9b0bfec2dd99948630de47b1094a6de443a;hpb=0f8cb479221e09bae8e03447c78527604cf69be4;p=spider.git diff --git a/cmd/set/isolate.pl b/cmd/set/isolate.pl index b008a9b0..893c204c 100644 --- a/cmd/set/isolate.pl +++ b/cmd/set/isolate.pl @@ -5,7 +5,7 @@ # # Copyright (c) 1998 - Dirk Koopman # -# $Id$ +# # my ($self, $line) = @_; @@ -15,24 +15,30 @@ my @out; my $user; my $create; -return (0) if $self->priv < 9; +return (1, $self->msg('e5')) 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); + $call = uc $call; + my $chan = DXChannel::get($call); + if ($chan) { + push @out, $self->msg('nodee1', $call); } else { - push @out, $self->msg('e3', "Set/Isolate", $call); + $user = DXUser::get($call); + $create = !$user; + $user = DXUser->new($call) if $create; + my $f; + push(@out, $self->msg('isoari', $call)), $f++ if Filter::getfn('route', $call, 1); + push(@out, $self->msg('isoaro', $call)), $f++ if Filter::getfn('route', $call, 0); + if ($user) { + unless ($f) { + $user->isolate(1); + $user->close(); + push @out, $self->msg($create ? 'isoc' : 'iso', $call); + Log('DXCommand', $self->msg($create ? 'isoc' : 'iso', $call)); + } + } else { + push @out, $self->msg('e3', "Set/Isolate", $call); + } } - } } return (1, @out);