added auto ping and obs count to dxchan
[spider.git] / cmd / connect.pl
index df9a42389c73dc38400c0b8f4b12dd3904855da0..d4a11d2ab7b03fb8c3eb15dc8ac8c71b9cccbcce 100644 (file)
@@ -5,7 +5,7 @@ my $self = shift;
 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('conscript', $lccall)) unless -e "$main::root/connect/$lccall";
@@ -22,6 +22,7 @@ if (defined $pid) {
                eval "{ package DB; sub DB {} }";
                alarm(0);
                DXChannel::closeall();
+               Msg::close_server();
                $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
                exec $prog, $call, 'connect';
        } else {