X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fstat%2Froute.pl;fp=cmd%2Fstat%2Froute.pl;h=57012eb8643a5da10e8d93aacefab2b953e04271;hb=cfa6a715412c7c4972ec85034bd2d945751317cb;hp=0000000000000000000000000000000000000000;hpb=34f47f7d220c9244769f1c6360a92fcae18803ba;p=spider.git diff --git a/cmd/stat/route.pl b/cmd/stat/route.pl new file mode 100644 index 00000000..57012eb8 --- /dev/null +++ b/cmd/stat/route.pl @@ -0,0 +1,28 @@ +# +# show a Route thingy +# +# Copyright (c) 2020 Dirk Koopman G1TLH +# +# A general purpose Route get thingy, use stat/route_user or _node if +# you want a list of all that particular type of thingy otherwise this +# is likely to be less typing and will dwym. +# + +my ($self, $line) = @_; +my @out; +my @list = split /\s+/, $line; # generate a list of callsigns + +push @list, $self->call unless @list; + +foreach my $call (@list) { + $call = uc $call; + my $ref = Route::get($call); + if ($ref) { + push @out, print_all_fields($self, $ref, "Route::User Information $call"); + } else { + push @out, "Route: $call not found"; + } + push @out, "" if @list > 1; +} + +return (1, @out);