2 # show the contents of the message directory
4 # Copyright (c) Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
20 foreach $ref (DXMsg::get_all()) {
21 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
24 } elsif ($f =~ /^O/o) { # dir/own
25 foreach $ref (DXMsg::get_all()) {
26 push @ref, $ref if $ref->private && ($ref->to eq $self->call || $ref->from eq $self->call);
28 } elsif ($f =~ /^N/o) { # dir/new
29 foreach $ref (DXMsg::get_all()) {
30 push @ref, $ref if $ref->private && !$ref->read && $ref->to eq $self->call;
32 } elsif ($f > 0) { # a number of items
35 my @all = (DXMsg::get_all());
37 for ($i = $#all; $i > 0; $i--) {
39 next if $self->priv < 5 && $ref->private && $ref->to ne $self->call && $ref->from ne $self->call;
41 last if ++$count > $n;