added show/425 command
[spider.git] / cmd / show / db0sdx.pl
index 130951e1b1747d4143e8b7b2a083620a940538c8..4fab75b2be2edcc4507e4fe2d9f0532c16202dcb 100644 (file)
@@ -13,13 +13,15 @@ my @out;
 $line = uc $line;
 return (1, $self->msg('e24')) unless $Internet::allow;
 return (1, "SHOW/DB0SDX <callsign>, e.g. SH/DB0SDX ea7wa") unless $line && is_callsign($line);
-my $target = 'dotnet.grossmann.com';
+my $target = $Internet::db0sdx_url || 'dotnet.grossmann.com';
 my $port = 80;
 my $cmdprompt = '/query->.*$/';
 
 my($info, $t);
                                     
 $t = new Net::Telnet;
+
+dbg("db0sdx: contacting $target:$port") if isdbg('db0sdx');
 $info =  $t->open(Host    => $target,
                  Port    => $port,
                  Timeout => 15);
@@ -28,6 +30,8 @@ if (!$info) {
        push @out, $self->msg('e18', 'DB0SDX Database server');
 } else {
 
+       dbg("db0sdx: connected to $target:$port") if isdbg('db0sdx');
+
        my $s = qq(<?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
@@ -43,7 +47,7 @@ if (!$info) {
        
        dbg("db0sdx out: $s") if isdbg('db0sdx');
        
-       $t->print("POST /qslinfo/qslinfo.asmx HTTP/1.1");
+       $t->print("POST /qslinfo/qslinfo.asmx HTTP/1.0");
        $t->print("Host: dotnet.grossmann.com");
        $t->print("Content-Type: text/xml; charset=utf-8");
        $t->print("Content-Length: $lth");