]> dxcluster.net Git - spider.git/blob - cmd/connect.pl
Improve the selection of parser for XML::Simple.
[spider.git] / cmd / connect.pl
1 #
2 # connect a cluster station
3 #
4 my $self = shift;
5 my $call = uc shift;
6 my $lccall = lc $call;
7
8 return (1, $self->msg('e5')) if $self->priv < 5;
9 return (1, $self->msg('e6')) unless $call gt ' ';
10 return (1, $self->msg('already', $call)) if DXChannel::get($call);
11 return (1, $self->msg('outconn', $call)) if grep {$_->{call} eq $call} @main::outstanding_connects;
12 return (1, $self->msg('conscript', $lccall)) unless -e "$main::root/connect/$lccall";
13
14 my $user = DXUser->get($call);
15 return (1, $self->msg('lockout', $call)) if $user && $user->lockout;
16
17 my @out;
18 push @out, $self->msg('constart', $call);
19 ExtMsg::start_connect($call, "$main::root/connect/$lccall");
20 return (1, @out);
21
22
23
24