projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more sopt dupe changes
[spider.git]
/
cmd
/
connect.pl
diff --git
a/cmd/connect.pl
b/cmd/connect.pl
index 93f62b71871d7d90b03c9e910edef02dfef72626..d1c583cbd3d6a7f3a65a7062bd373523d34c48af 100644
(file)
--- a/
cmd/connect.pl
+++ b/
cmd/connect.pl
@@
-5,24
+5,20
@@
my $self = shift;
my $call = uc shift;
my $lccall = lc $call;
my $call = uc shift;
my $lccall = lc $call;
-return (
0) if $self->priv < 8
;
+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('e6')) unless $call gt ' ';
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('conscript', $lccall)) unless -e "$main::root/connect/$lccall";
-my $prog = "$main::root/local/client.pl";
-$prog = "$main::root/perl/client.pl" if ! -e $prog;
+my $user = DXUser->get($call);
+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");
+return (1, @out);
-my $pid = fork();
-if (defined $pid) {
- if (!$pid) {
- # in child
- exec $prog, $call, 'connect';
- } else {
- return(1, $self->msg('constart', $call));
- }
-}
-return (0, $self->msg('confail', $call, $!))