added show/ik3qar command
authorDirk Koopman <djk@tobit.co.uk>
Thu, 26 Jun 2008 12:49:50 +0000 (13:49 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 26 Jun 2008 12:49:50 +0000 (13:49 +0100)
Changes
cmd/Commands_en.hlp
cmd/show/dxqsl.pl
cmd/show/ik3qar.pl [new file with mode: 0644]
perl/Internet.pm
perl/Version.pm

diff --git a/Changes b/Changes
index d8daa85145b6725d48bf2435143d8697a5a26d3d..58d8329d0e676906de38eca83b4a6c1a04f5328d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+26Jun08=======================================================================
+1. added show/ik3qar command by Leo IZ5FSA. See comments in perl/Internet.pm
+for setup instructions (note that you will have to copy these lines to
+local/Internet.pm before it will work).
 24Jun08=======================================================================
 1. Change the route finding algorithm completely. No more recursion. No more
 tree searching. It now gives you answers even on a partial cluster map. Oh
 24Jun08=======================================================================
 1. Change the route finding algorithm completely. No more recursion. No more
 tree searching. It now gives you answers even on a partial cluster map. Oh
index 99413b3f1c5e3ddedfd423972ff13b448aaa9d22..c7b436aac37a10d6796d1175f9ef510a7344eae6 100644 (file)
@@ -2215,7 +2215,13 @@ the worldwide statistics.
 This command shows the hop counts set up for a node. You can specify
 which category you want to see. If you leave the category out then 
 all the categories will be listed.
 This command shows the hop counts set up for a node. You can specify
 which category you want to see. If you leave the category out then 
 all the categories will be listed.
+
+=== 0^SHOW/IK3QAR <callsign>^Obtain QSL info from IK3QAR database
+Get QSL information from the online dabase run by IK3QAR.
+
+Your sysop needs to set up this command by obtaining a password from IK3QAR.
+Instructions are available in local/Internet.pm
+
 === 1^SHOW/ISOLATE^Show list of ISOLATED nodes
 
 === 9^SHOW/LOCKOUT <prefix>|ALL^Show the list of locked out or excluded callsigns
 === 1^SHOW/ISOLATE^Show list of ISOLATED nodes
 
 === 9^SHOW/LOCKOUT <prefix>|ALL^Show the list of locked out or excluded callsigns
index a4b0a3f9f8f82fdf38269aa4901bbc18f774d08f..2017a6ae37c6db0ff179d0ec110ca29193549e70 100644 (file)
@@ -10,7 +10,7 @@ my ($self, $line) = @_;
 my @call = split /\s+/, uc $line;
 my @out;
 
 my @call = split /\s+/, uc $line;
 my @out;
 
-$DB::single=1;
+#$DB::single=1;
 
 return (1, $self->msg('db3', 'QSL')) unless $QSL::dbm;
 
 
 return (1, $self->msg('db3', 'QSL')) unless $QSL::dbm;
 
diff --git a/cmd/show/ik3qar.pl b/cmd/show/ik3qar.pl
new file mode 100644 (file)
index 0000000..cc1d67d
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Query the IK3QAR Database server for a callsign
+#
+# from an idea by Paolo,IK3QAR and Leo,IZ5FSA
+#
+# $Id$
+#
+my ($self, $line) = @_;
+my @list = map {uc} split /\s+/, $line;               # generate a list of callsigns
+my $op;
+my $call = $self->call;
+my @out;
+
+return (1, $self->msg('e24')) unless $Internet::allow;
+return (1, "SHOW/IK3QAR <callsign>\n  e.g. SH/IK3QAR II5I, SH/IK3QAR V51AS\n") unless @list;
+
+my $target = $Internet::ik3qar_url;
+my $port = 80;
+my $url = "http://".$target;
+
+use Net::Telnet;
+my $t = new Net::Telnet;
+eval {$t->open( Host     => $target,
+                Port     => $port,
+                Timeout  => 30);
+};
+
+if (!$t || $@) {
+        push @out, $self->msg('e18', 'Open(IK3QAR.it)');
+} else {
+        dbg($list[0]."|".$list[1]) if isdbg('IK3QAR');
+        $op="call=".$list[0]."&node=".$main::mycall."&passwd=".$Internet::ik3qar_pw."&user=".$call;
+        my $s = "GET $url/manager/dxc/dxcluster.php?$op HTTP/1.0\n"
+       ."User-Agent:DxSpider;$main::version;$main::build;$^O;$main::mycall;$call\n\n";
+        dbg($s) if isdbg('IK3QAR');
+        $t->print($s);
+        Log('call', "$call: SH/IK3QAR $list[0]");
+        my $state = "blank";
+        my $count = 1;
+        while (my $result = eval { $t->getline(Timeout => 30) } || $@) {
+                dbg($result) if isdbg('IK3QAR') && $result;
+                ++$count;
+                if ($count > 9) {
+                        push @out, $result;
+                }
+        }
+        $t->close;
+        push @out, $self->msg('e3', 'Search(IK3QAR.it)', uc $list[0]) unless @out;
+}
+
+return (1, @out);
index e211728198e61a10bfde457dfe358941bb0b4380..89ef472129644914c8b1f21d8f40146e6c5d7037 100644 (file)
@@ -73,6 +73,18 @@ $dx425_url = 'www.ariscandicci.it';          # used by show/425
 $contest_host = 'www.sk3bg.se';         # used by show/contest
 $contest_url = "http://$contest_host/contest/text";         # used by show/contest
 
 $contest_host = 'www.sk3bg.se';         # used by show/contest
 $contest_url = "http://$contest_host/contest/text";         # used by show/contest
 
+#SHOW/IK3QAR <callsign> Show the 5 most recent informations found on IK3QAR
+##Callsign Database about QSL Manager, Manager address and comments. This
+##command works for sysop subscribed for the service at:
+##    http://www.ik3qar.it/manager/dxc.php
+##Write the given password below in $ik3qar_pw
+#
+$ik3qar_url = 'www.ik3qar.it';    # used by show/ik3qar
+$ik3qar_pw = 'PUT-PASSWORD-HERE';    # used by show/ik3qar
+
+# NOTE: you must copy $ik3qar_* lines to local/Internet.pm for them to have
+# any effect on an already running node.
+#
 #
 # end
 #
 #
 # end
 #
index 88693a9ffe8421749349d272fa8ba7a7e9c17884..886ba4763d29e07aed715ed6a09ea47514d1c8b7 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.55';
 $subversion = '0';
 
 $version = '1.55';
 $subversion = '0';
-$build = '20';
+$build = '21';
 
 1;
 
 1;