X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fconnect.pl;h=e76bd01e0390b4e2bc50bb71820093b13f524b74;hb=4c60d18d0d58ece2406680d4afd4ff016532c11c;hp=759785f87680ee4b7e56e4e55ba21437295439b4;hpb=015e51891a2052454449c99fde521a36efdad9e2;p=spider.git diff --git a/cmd/connect.pl b/cmd/connect.pl index 759785f8..e76bd01e 100644 --- a/cmd/connect.pl +++ b/cmd/connect.pl @@ -7,16 +7,25 @@ my $lccall = lc $call; return (1, $self->msg('e5')) if $self->priv < 5; return (1, $self->msg('e6')) unless $call gt ' '; -return (1, $self->msg('already', $call)) if DXChannel->get($call); +return (1, $self->msg('already', $call)) if DXChannel::get($call); return (1, $self->msg('outconn', $call)) if grep {$_->{call} eq $call} @main::outstanding_connects; return (1, $self->msg('conscript', $lccall)) unless -e "$main::root/connect/$lccall"; my $user = DXUser->get($call); -return (1, $self->msg('lockout', $call)) if $user->lockout; +return (1, $self->msg('lockout', $call)) if $user && $user->lockout; my @out; push @out, $self->msg('constart', $call); -ExtMsg::start_connect($call, "$main::root/connect/$lccall"); +my $fn = "$main::root/connect/$lccall"; + +my $f = new IO::File $fn; +if ($f) { + my @f = <$f>; + $f->close; + ExtMsg::start_connect($call, @f); +} else { + push @out, $self->msg('e3', 'connect', $fn); +} return (1, @out);