X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fdisconnect.pl;h=e8e83b89c4778f18f5c730e7c5c2d858dd9a1236;hb=913e07d082fe3b83276ac1b17dfc5fe22e2d8439;hp=6154d3cc27c0e7bc26fa61d68db6d5998ef726e3;hpb=0824a94355e5fb2b4c379bb013d66466725629f5;p=spider.git diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl index 6154d3cc..e8e83b89 100644 --- a/cmd/disconnect.pl +++ b/cmd/disconnect.pl @@ -6,22 +6,24 @@ my @calls = split /\s+/, $line; my $call; my @out; -if ($self->priv < 9) { - return (1, "not allowed"); +if ($self->priv < 8) { + return (1, $self->msg('e5')); } foreach $call (@calls) { $call = uc $call; + next if $call eq $main::mycall; my $dxchan = DXChannel->get($call); if ($dxchan) { if ($dxchan->is_ak1a) { - $dxchan->send_now("D", $self->pc39('Disconnected')); - } else { - $dxchan->disconnect; - } - push @out, "disconnected $call"; + $dxchan->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', $self->call))); + } else { + $dxchan->send_now('D', $self->msg('disc1', $self->call)); + } + $dxchan->disconnect; + push @out, $self->msg('disc2', $call); } else { - push @out, "$call not connected locally"; + push @out, $self->msg('e10', $call); } }