added changes to sh/sun and sh/moon from Steve Franke K9AN
authorminima <minima>
Sat, 28 Oct 2000 10:51:27 +0000 (10:51 +0000)
committerminima <minima>
Sat, 28 Oct 2000 10:51:27 +0000 (10:51 +0000)
reworked his show/ham into sh/call

Changes
cmd/show/call.pl [new file with mode: 0644]
cmd/show/moon.pl
cmd/show/sun.pl
perl/Messages

diff --git a/Changes b/Changes
index d553ce872a49d0695d21e205c3f8588a98e6639e..d91bea2a8173607d4a51d95b361b2324fc223d99 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,9 @@
+28Oct00=======================================================================
+1. updated show/sun and show/moon from stuff sent by Steve Franke K9
+2. added show/call which queries jeifer.pineknot.com for any call in the 
+world (as opposed to UALR which only does US calls). Inspired by a bit of 
+perl sent to me by Steve Franke (again!) and also Angel EA7WA who gave me the
+pineknot ip address.
 27Oct00=======================================================================
 1. alter the code in clean_old of DXMsg system to see if we get some different
 behaviour with random crashing
diff --git a/cmd/show/call.pl b/cmd/show/call.pl
new file mode 100644 (file)
index 0000000..92a9923
--- /dev/null
@@ -0,0 +1,33 @@
+#
+# Query the PineKnot Database server for a callsign
+#
+# from an idea by Steve Franke K9AN and information from Angel EA7WA
+#
+# $Id$
+#
+my ($self, $line) = @_;
+my @list = split /\s+/, $line;               # generate a list of callsigns
+my $l;
+my @out;
+
+use Net::Telnet;
+
+my $t = new Net::Telnet;
+
+push @out, $self->msg('call1');
+foreach $l (@list) {
+       $t->open(Host     =>  "jeifer.pineknot.com",
+                        Port     =>  1235,
+                        Timeout  =>  5);
+       if ($t) {
+               $t->print(uc $l);
+               while (my $result = $t->getline) {
+                       push @out,$result;
+               }
+               $t->close;
+       } else {
+               push @out, $self->msg('e18', 'PineKnot');
+       }
+}
+
+return (1, @out);
index b1e4feb4fc0d64780845c441a0e2a1a66fc0e7c1..ef1ba4573a9516695c0dc89ce5979f5100492ae0 100644 (file)
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 #
-# show sunrise and sunset times for each callsign or prefix entered
+# show moonrise and moonset times for each callsign or prefix entered
 #
 # 1999/11/9 Steve Franke K9AN
-#
+# 2000/10/27 fixed bug involving degree to radian conversion.
 
 my ($self, $line) = @_;
 my @list = split /\s+/, $line;
@@ -21,7 +21,7 @@ if (@list) {
        foreach $l (@list) {
                my $user = DXUser->get_current(uc $l);
                if ($user && $user->lat && $user->long) {
-                       push @in, [$user->qth, $user->lat * $d2r, $user->long * -$d2r, uc $l ];
+                       push @in, [$user->qth, $user->lat, -$user->long, uc $l ];
                } else {
                        # prefixes --->
                        my @ans = Prefix::extract($l);
index 80eb54ee57985fe1af96077243969775ec3276d5..07172ce05b34cafaa794bf840b9d7d6a2fc51fa0 100644 (file)
@@ -3,7 +3,7 @@
 # show sunrise and sunset times for each callsign or prefix entered
 #
 # 1999/11/9 Steve Franke K9AN
-#
+# 2000/10/27 fixed bug involving degree to radian conversion.
 
 my ($self, $line) = @_;
 my @list = split /\s+/, $line;
@@ -21,7 +21,7 @@ if (@list) {
        foreach $l (@list) {
                my $user = DXUser->get_current(uc $l);
                if ($user && $user->lat && $user->long) {
-                       push @in, [$user->qth, $user->lat * $d2r, $user->long * -$d2r, uc $l ];
+                       push @in, [$user->qth, $user->lat, -$user->long, uc $l ];
                } else {
                        # prefixes --->
                        my @ans = Prefix::extract($l);
index e7d9d8c650e959823f3b3d720c29023618b9121b..36168778025d849dfee108d5d704bf5f3aa40cbd 100644 (file)
@@ -18,6 +18,7 @@ package DXM;
                                bbs => 'Your BBS Address is now \"$_[0]\"',
                                beepoff => 'Beeps are now off',
                                beepon => 'Beeps are now on',
+                               call1 => 'Callsign lookup via Pineknot:',
                                conother => 'Sorry $_[0] you are connected on another port',
                                concluster => 'Sorry $_[0] you are already connected elsewhere on the cluster',
                                conscript => 'no connect script called \"$_[0]\" found in $main::root/connect',
@@ -58,6 +59,7 @@ package DXM;
                                e15 => 'invalid qualifier \"$_[0]\"',
                                e16 => 'File \"$_[0]\" exists',
                                e17 => 'Please don\'t use the words: @_ on here', 
+                               e18 => 'Cannot connect to $_[0] ($!)',
 
                                echoon => 'Echoing enabled',
                                echooff => 'Echoing disabled',