X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fqrz.pl;h=5aef18283d9dda8abe147817810768356793f3aa;hb=209156e38a1a136ba8c8cf0e9df122eb63c8f2c9;hp=a5d14138c38a0a791e909801c181ac3c683cbcf0;hpb=ed2d469812ca5ab82baab7f8b4795660e01ef539;p=spider.git diff --git a/cmd/show/qrz.pl b/cmd/show/qrz.pl index a5d14138..5aef1828 100644 --- a/cmd/show/qrz.pl +++ b/cmd/show/qrz.pl @@ -29,7 +29,7 @@ foreach $l (@list) { } Log('call', "$call: show/qrz \U$l"); - push @out, $self->msg('http1', "show/qrz \U$l"); + push @out, $self->msg('http1', 'qrz.com', "\U$l"); $self->http_get($host, $s, sub { @@ -40,27 +40,31 @@ foreach $l (@list) { dbg("qrz response: $response"); dbg("qrz body: $body"); } - Log('call', "$call: show/qrz \U$body"); - my $state = "blank"; - foreach my $result (split /\r?\n/, $body) { - dbg("qrz: $result") if isdbg('qrz') && $result; - if ($state eq 'blank' && $result =~ /^/i) { - $state = 'go'; - } elsif ($state eq 'go') { - next if $result =~ m||; - next if $result =~ m||; - next if $result =~ m||; - next if $result =~ m||; - next if $result =~ m||; - last if $result =~ m||; - my ($tag, $data) = $result =~ m|^\s*<(\w+)>(.*)msg('http2', "show/qrz \U$l"); + if ($response =~ /^5/) { + push @out, $self->msg('e18',"qrz.com $!"); } else { - push @out, $self->msg('e3', 'show/qrz', uc $l); + Log('call', "$call: show/qrz \U$body"); + my $state = "blank"; + foreach my $result (split /\r?\n/, $body) { + dbg("qrz: $result") if isdbg('qrz') && $result; + if ($state eq 'blank' && $result =~ /^/i) { + $state = 'go'; + } elsif ($state eq 'go') { + next if $result =~ m||; + next if $result =~ m||; + next if $result =~ m||; + next if $result =~ m||; + next if $result =~ m||; + last if $result =~ m||; + my ($tag, $data) = $result =~ m|^\s*<(\w+)>(.*)msg('http2', "show/qrz \U$l"); + } else { + push @out, $self->msg('e3', 'show/qrz', uc $l); + } } $self->send_ans(@out); }