X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fdisconnect.pl;fp=cmd%2Fdisconnect.pl;h=bc3570476f78d6f849a3d0318a28ba19f3602a94;hb=2546ef0cfaaca39e65985e414258071a636979af;hp=0000000000000000000000000000000000000000;hpb=fdc1150da7dbd9c1094d8df7a4744fb917017ed2;p=spider.git diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl new file mode 100644 index 00000000..bc357047 --- /dev/null +++ b/cmd/disconnect.pl @@ -0,0 +1,24 @@ +# +# disconnect a local user +# +my ($self, $line) = @_; +my @calls = split /\s+/, $line; +my $call; +my @out; + +if ($self->priv < 9) { + return (1, "not allowed"); +} + +foreach $call (@calls) { + $call = uc $call; + my $dxchan = DXChannel->get($call); + if ($dxchan) { + $dxchan->disconnect; + push @out, "disconnected $call"; + } else { + push @out, "$call not connected locally"; + } +} + +return (1, @out);