Fix create_sysop.pl to work on base git install
[spider.git] / perl / DXCommandmode.pm
index 0f45213596374b5da4c7f585f3bf730906a413dc..b10149ec6bcbd9bcf75b27e8839898878c21dd41 100644 (file)
@@ -155,6 +155,10 @@ sub start
                $self->{registered} = 1;
        }
 
+       # establish slug queue, if required
+       $self->{sluggedpc11s} = [];
+       $self->{isslugged} = $DXProt::pc92_slug_changes + $main::systime if $DXProt::pc92_slug_changes;
+
        # send the relevant MOTD
        $self->send_motd;
 
@@ -996,10 +1000,12 @@ sub format_dx_spot
 
        my $t = ztime($_[2]);
        my $loc = '';
-       my $clth = 30;
+       my $clth = 31 + $self->{width} - 80;    # allow comment to grow according the screen width 
        #       --$clth if $self->{consort} eq 'local';
        
        my $comment = substr (($_[3] || ''), 0, $clth);
+       $comment =~ s/\t/ /g;
+       
        $comment .= ' ' x ($clth - (length($comment)));
        
     if ($self->{user}->wantgrid) {
@@ -1335,11 +1341,16 @@ sub spawn_cmd
                         sub {
                                 my $subpro = shift;
                                 if (isdbg('progress')) {
-                                        my $s = qq{line: "$line"};
+                                        my $s = qq{$call line: "$line"};
                                         $s .= ", args: " . join(', ', map { defined $_ ? qq{'$_'} : q{'undef'} } @$args) if $args && @$args;
                                         dbg($s);
                                 }
-                                eval { @out = $cmdref->(@$args); };
+                                eval {
+                                        ++$self->{_in_sub_process};
+                                        dbg "\$self->{_in_sub_process} = $self->{_in_sub_process}";
+                                        @out = $cmdref->(@$args);
+                                        --$self->{_in_sub_process} if $self->{_in_sub_process} > 0;
+                                };
                                 if ($@) {
                                         DXDebug::dbgprintring(25);
                                         push @out, DXDebug::shortmess($@);