add beginnings of a route find command.
[spider.git] / cmd / directory.pl
index 9ddbb77542d2a9e4f6d2536f32d10b8853340d94..6726eb95024bd5edcb5fae69dc5ef19cd142fb13 100644 (file)
@@ -13,7 +13,12 @@ my $ref;
 my @out;
 my $f;
 my $n = 0;
-my @all = grep {!($self->priv < 5 && $_->to ne $self->call && $_->from ne $self->call)} (DXMsg::get_all());
+
+# select candidates
+my @all = grep {!$_->private || !($self->priv < 5 && $_->to ne $self->call && $_->from ne $self->call)} (DXMsg::get_all());
+@all =  grep {!$_->delete  || ($self->priv >= 5 && $_->delete)} @all;
+
+return (1, $self->msg('dir1')) unless @all;
 my $sel = 0;
 my $from = 0;
 my $to = $all[@all-1]->msgno;
@@ -75,6 +80,6 @@ if (@ref) {
                last if ++$count >= $n;
        }
 } else {
-       push @out, $self->msg('e3', 'directory', $line); 
+       push @out, $self->msg('dir1'); 
 }
 return (1, @out);