X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fstation.pl;h=868ebda9b81f34cd5aed73f20b39044cb1a19aaf;hb=b91c26500777507359a3dd77309a9943226aad0b;hp=b5b0f6c5a77986897fceea50a997c10dcab9483b;hpb=6624dcdf07d628e8d6a16fc6549edf40be25b7b2;p=spider.git diff --git a/cmd/show/station.pl b/cmd/show/station.pl index b5b0f6c5..868ebda9 100644 --- a/cmd/show/station.pl +++ b/cmd/show/station.pl @@ -11,10 +11,20 @@ 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 @f == 1 && $self->priv < 6; + return (1, $self->msg('e6')) if $self->priv < 5 || $f[1] eq '*'; + 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; @@ -60,7 +70,7 @@ if (@f == 0) { } my $cref = Route::get($call); - my $seek = join(',', $cref->parents) if $cref; + my $seek = $cref->isa('Route::Node') ? $call : join(',', $cref->parents) if $cref; if ($seek) { push @out, "User : $call (at $seek)";