add uref for call in edu
[spider.git] / cmd / connect.pl
index 759785f87680ee4b7e56e4e55ba21437295439b4..1f1ad03f640b76f53f1a59f8b1e8aecd678afb5e 100644 (file)
@@ -12,11 +12,20 @@ return (1, $self->msg('outconn', $call)) if grep {$_->{call} eq $call} @main::ou
 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);