projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
undo rounding change
[spider.git]
/
cmd
/
connect.pl
diff --git
a/cmd/connect.pl
b/cmd/connect.pl
index d80a468b97c84c929d4d81ec0ebdb2959e031e06..e76bd01e0390b4e2bc50bb71820093b13f524b74 100644
(file)
--- a/
cmd/connect.pl
+++ b/
cmd/connect.pl
@@
-7,13
+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('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";
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 && $user->lockout;
+
my @out;
push @out, $self->msg('constart', $call);
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);
return (1, @out);