X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fmsg_status.pl;h=6462568afadd8767f255cb39a6e2454c01e418b1;hb=273e163e763b8b61ca39875ae2797e048d1895aa;hp=5a2e7e07e4934d7e694f01ca014a5a4d436f3913;hpb=f939c447ca5ef37073054a73e50b48a63533a9bc;p=spider.git diff --git a/cmd/show/msg_status.pl b/cmd/show/msg_status.pl index 5a2e7e07..6462568a 100644 --- a/cmd/show/msg_status.pl +++ b/cmd/show/msg_status.pl @@ -5,17 +5,27 @@ # # $Id$ # -my $self = shift; +my ($self, $line) = @_; return (0, $self->msg('e5')) if $self->priv < 5; my @out; -push @out, "Work Queue"; -for (keys %DXMsg::work) { - push @out, "$_ : $DXMsg::work{$_}\n"; +if (!$line || $line =~ /^b/i) { + push @out, "Busy Queue"; + push @out, "----------"; + for (keys %DXMsg::busy) { + my $r = $DXMsg::busy{$_}; + push @out, "$_ : $r->{msgno}, $r->{from} -> $r->{to}, $r->{subject}\n"; + } } -push @out, "Busy Queue"; -for (keys %DXMsg::busy) { - push @out, "$_ : $DXMsg::busy{$_}\n"; +if (!$line || $line =~ /^w/i) { + push @out, "Work Queue"; + push @out, "----------"; + for (keys %DXMsg::work) { + my $r = $DXMsg::work{$_}; + push @out, "$_ : msgno $r->{msgno}, total lines $r->{linesreq}, count $r->{count}\n"; + push @out, "$_ : stream $r->{stream}, tonode $r->{tonode}, fromnode $r->{fromnode}\n"; + } } + return (0, @out);