X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=d48de1c87a17d3edac8e27f358e3a21e46c2dd86;hp=2ae7a0605eb9b5470e0756a90dd7c0e8cd6521ed;hb=20b0104deaeab77fa7ab1444dbcedfcdbf5865f8;hpb=07ea293f3919d2da76220b5fbc55b734008ed44c diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 2ae7a060..d48de1c8 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -42,6 +42,7 @@ sub start $self->{priv} = $user->priv; $self->{priv} = 0 if $line =~ /^(ax|te)/; # set the connection priv to 0 - can be upgraded later $self->{consort} = $line; # save the connection type + $self->sort('U'); # set the channel type } # @@ -92,7 +93,19 @@ sub normal # sub process { + my $t = time; + my @chan = DXChannel->get_all(); + my $chan; + + foreach $chan (@chan) { + next if $chan->sort ne 'U'; + # send a prompt if no activity out on this channel + if ($t >= $chan->t + $main::user_interval) { + $chan->prompt() if $chan->{state} =~ /^prompt/o; + $chan->t($t); + } + } } #