From: Dirk Koopman Date: Thu, 26 Jun 2008 12:49:50 +0000 (+0100) Subject: added show/ik3qar command X-Git-Tag: 1.56~75 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=51de27cf70637ec8687f43d75d4d9ef3f67e1fa3;p=spider.git added show/ik3qar command --- diff --git a/Changes b/Changes index d8daa851..58d8329d 100644 --- 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 diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index 99413b3f..c7b436aa 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -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. - + +=== 0^SHOW/IK3QAR ^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 |ALL^Show the list of locked out or excluded callsigns diff --git a/cmd/show/dxqsl.pl b/cmd/show/dxqsl.pl index a4b0a3f9..2017a6ae 100644 --- a/cmd/show/dxqsl.pl +++ b/cmd/show/dxqsl.pl @@ -10,7 +10,7 @@ my ($self, $line) = @_; my @call = split /\s+/, uc $line; my @out; -$DB::single=1; +#$DB::single=1; 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 index 00000000..cc1d67d5 --- /dev/null +++ b/cmd/show/ik3qar.pl @@ -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 \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); diff --git a/perl/Internet.pm b/perl/Internet.pm index e2117281..89ef4721 100644 --- a/perl/Internet.pm +++ b/perl/Internet.pm @@ -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 +#SHOW/IK3QAR 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 # diff --git a/perl/Version.pm b/perl/Version.pm index 88693a9f..886ba476 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.55'; $subversion = '0'; -$build = '20'; +$build = '21'; 1;