mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
added show/ik3qar command
This commit is contained in:
parent
2255cfd184
commit
51de27cf70
4
Changes
4
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
|
||||
|
@ -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 <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
|
||||
|
@ -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;
|
||||
|
||||
|
51
cmd/show/ik3qar.pl
Normal file
51
cmd/show/ik3qar.pl
Normal file
@ -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);
|
@ -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 <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
|
||||
#
|
||||
|
@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
|
||||
|
||||
$version = '1.55';
|
||||
$subversion = '0';
|
||||
$build = '20';
|
||||
$build = '21';
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user