From 273bb156dcab276845ac5984ccebfa2cc68b451a Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 6 Jun 2001 13:31:22 +0000 Subject: [PATCH] add route_node and route_user commands --- cmd/stat/route_node.pl | 26 ++++++++++++++++++++++++++ cmd/stat/route_user.pl | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 cmd/stat/route_node.pl create mode 100644 cmd/stat/route_user.pl diff --git a/cmd/stat/route_node.pl b/cmd/stat/route_node.pl new file mode 100644 index 00000000..1cedcb44 --- /dev/null +++ b/cmd/stat/route_node.pl @@ -0,0 +1,26 @@ +# +# show a Route::Node thingy +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +my ($self, $line) = @_; +my @list = split /\s+/, $line; # generate a list of callsigns +@list = ($self->call) if !@list; # my channel if no callsigns + +my $call; +my @out; +foreach $call (@list) { + $call = uc $call; + my $ref = Route::Node::get($call); + if ($ref) { + @out = print_all_fields($self, $ref, "Route::Node Information $call"); + } else { + push @out, "Route::User: $call not found"; + } + push @out, "" if @list > 1; +} + +return (1, @out); diff --git a/cmd/stat/route_user.pl b/cmd/stat/route_user.pl new file mode 100644 index 00000000..37a079b8 --- /dev/null +++ b/cmd/stat/route_user.pl @@ -0,0 +1,26 @@ +# +# show a Route::User thingy +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +my ($self, $line) = @_; +my @list = split /\s+/, $line; # generate a list of callsigns +@list = ($self->call) if !@list; # my channel if no callsigns + +my $call; +my @out; +foreach $call (@list) { + $call = uc $call; + my $ref = Route::User::get($call); + if ($ref) { + @out = print_all_fields($self, $ref, "Route::User Information $call"); + } else { + push @out, "Route::User: $call not found"; + } + push @out, "" if @list > 1; +} + +return (1, @out); -- 2.43.0