2 # Query the 425 Database server for a callsign
4 # from an idea by Leo,IZ5FSA and 425DxNews Group
8 my ($self, $line) = @_;
9 my @list = map {uc} split /\s+/, $line; # generate a list of callsigns
11 my $call = $self->call;
14 return (1, $self->msg('e24')) unless $Internet::allow;
15 return (1, "SHOW/425 <callsign>\nSHOW/425 CAL\nSHOW/425 BULL <bulletin number>\n e.g. SH/425 IQ5BL, SH/425 CAL, SH/425 BUL 779\n") unless @list;
17 my $target = "www.ari.it";
19 my $url = "http://www.ari.it";
22 my $t = new Net::Telnet;
23 eval {$t->open( Host => $target,
29 push @out, $self->msg('e18', 'Open(ARI.org)');
31 dbg($list[0]."|".$list[1]) if isdbg('425');
32 if ($list[0] eq "CAL") {
35 elsif ($list[0] eq "BULL") {
36 $op="op=bull&query=".$list[1];
39 $op="op=search&query=".$list[0];
41 my $s = "GET $url/hf/dx-news/spider.php?$op HTTP/1.0\n"
42 ."User-Agent:DxSpider;$main::version;$main::build;$^O;$main::mycall;$call;$list[0]\n\n";
43 dbg($s) if isdbg('425');
45 Log('call', "$call: show/425 \U$op");
48 while (my $result = eval { $t->getline(Timeout => 30) } || $@) {
49 dbg($result) if isdbg('425') && $result;
56 push @out, $self->msg('e3', 'Search(ARI.org)', uc $op) unless @out;