From 955db8c44f956cb6e0e3624061c9168e5a0cc93f Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 2 Jan 2001 23:27:57 +0000 Subject: [PATCH] add show/route command --- Changes | 1 + cmd/Commands_en.hlp | 6 ++++++ cmd/show/route.pl | 25 +++++++++++++++++++++++++ perl/Messages | 1 + 4 files changed, 33 insertions(+) create mode 100644 cmd/show/route.pl diff --git a/Changes b/Changes index 905506b9..d7964bf7 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ 1. added a help file for forward/latlong and updated the admin manual to match. (g0vgs) 2. Add spot2csv.pl to convert spot files into tab delimited .csv format. +3. Add show/route to see which interface a station is connected on. 31Dec00======================================================================= 1. add lat/long info to show/prefix 30Dec00======================================================================= diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index 6968699a..257e1713 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -1351,6 +1351,12 @@ This command queries the QRZ callbook server on the internet and returns any information available for that callsign. This service is provided for users of this software by http://www.qrz.com +=== 0^SHOW/ROUTE ...^Show the route to the callsign +This command allows you to see which node the callsigns specified are +connected via. It is a sort of inverse sh/config. + +sh/route n2tly + === 0^SHOW/SATELLITE [ ]^Show tracking data Show the tracking data from your location to the satellite of your choice from now on for the next few hours. diff --git a/cmd/show/route.pl b/cmd/show/route.pl new file mode 100644 index 00000000..95497d2d --- /dev/null +++ b/cmd/show/route.pl @@ -0,0 +1,25 @@ +# +# show the routing to a node or station +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +my ($self, $line) = @_; +my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes +my @out; + +return (1, $self->msg('e6')) unless @list; + +my $l; +foreach $l (@list) { + my $ref = DXCluster->get_exact($l); + if ($ref) { + push @out, $self->msg('route', $l, $ref->mynode->call, $ref->dxchan->call); + } else { + push @out, $self->msg('e7', $l); + } +} + +return (1, @out); diff --git a/perl/Messages b/perl/Messages index 98a1cb11..5ed24fc1 100644 --- a/perl/Messages +++ b/perl/Messages @@ -183,6 +183,7 @@ package DXM; read1 => 'Sorry, no new messages for you', read2 => 'Msg $_[0] not found', read3 => 'Msg $_[0] not available', + route => '$_[0] on $_[1] via $_[2]', sat1 => 'Tracking Table for $_[0] for the next $_[1] hours every $_[2] mins', sat2 => 'dd/mm UTC Lat Lon Alt Km Az El Dist Km', sat3 => 'Syntax: SH/SAT [ ]', -- 2.34.1