2 # show the contents of the message directory
4 # Copyright (c) Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
18 my @all = (DXMsg::get_all());
20 for ($i = $#all; $i > 0; $i--) {
22 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
24 last if ++$count >= $n;
31 foreach $ref (DXMsg::get_all()) {
32 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
36 } elsif ($f =~ /^O/o) { # dir/own
37 foreach $ref (DXMsg::get_all()) {
38 push @ref, $ref if $ref->private && ($ref->to eq $self->call || $ref->from eq $self->call);
40 } elsif ($f =~ /^N/o) { # dir/new
41 foreach $ref (DXMsg::get_all()) {
42 push @ref, $ref if $ref->private && !$ref->read && $ref->to eq $self->call;
44 } elsif ($f eq '>' || $f eq 'TO'){
48 foreach $ref (DXMsg::get_all()) {
49 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
50 next unless $ref->to =~ m{$f};
54 } elsif ($f eq '<' || $f eq 'FROM'){
58 foreach $ref (DXMsg::get_all()) {
59 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
60 next unless $ref->from =~ m{$f};
64 } elsif ($f =~ /^\d+$/ && $f > 0) { # a number of items
76 last if ++$count >= $n;
79 push @out, $self->msg('e3', 'directory', $line);