adding missing regex handling
[spider.git] / cmd / show / station.pl
index b5b0f6c5a77986897fceea50a997c10dcab9483b..26f2bbe6489fbb7f3c0b0274ddf74a65a15d4ca7 100644 (file)
@@ -11,10 +11,19 @@ my @f = split /\s+/, uc $line;
 my @out;
 my $call;
 my $seek;
+push @f, $self->call unless @f;
 
-if (@f == 0) {
-       return (1, $self->msg('e6')) if ($self->priv < 5); 
-       my @calls = DXUser::get_all_calls();
+if (@f <= 2 && uc $f[0] eq 'ALL') {
+       return (1, $self->msg('e6')) if ($self->priv < 6); 
+       shift @f;
+       my $exp = shellregex(uc shift @f) if @f; 
+       my @calls;
+       if ($exp) {
+               @calls = grep {m{$exp}} DXUser::get_all_calls();
+    } else {
+               @calls = DXUser::get_all_calls();
+       }
+       
        foreach $call (@calls) {
                my $ref = DXUser->get_current($call);
                next if !$ref;