add show/route command
authorminima <minima>
Tue, 2 Jan 2001 23:27:57 +0000 (23:27 +0000)
committerminima <minima>
Tue, 2 Jan 2001 23:27:57 +0000 (23:27 +0000)
Changes
cmd/Commands_en.hlp
cmd/show/route.pl [new file with mode: 0644]
perl/Messages

diff --git a/Changes b/Changes
index 905506b9281b1d272552aa960907c829f5952ca3..d7964bf73710466191270ebeef841c43d43f781f 100644 (file)
--- 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=======================================================================
index 6968699a39a5557aad1d28763c41ba11cbf6bfbe..257e171397316a94bb95cf4a895f61d9393ac678 100644 (file)
@@ -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 <callsign> ...^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 <name> [<hours> <interval>]^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 (file)
index 0000000..95497d2
--- /dev/null
@@ -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);
index 98a1cb11844cca517a9d9e8b7de6584cf070811b..5ed24fc1bc5fe7389f143cb7eb1ad52fa9e8ecd9 100644 (file)
@@ -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 <name> [<hours> <interval>]',