2 # Query the QRZ Database server for a callsign
4 # from an idea by Steve Franke K9AN and information from Angel EA7WA
8 my ($self, $line) = @_;
9 my @list = 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/QRZ <callsign>, e.g. SH/QRZ g1tlh") unless @list;
19 my $t = new Net::Telnet;
22 $t->open(Host => "qrz.com",
26 my $s = "GET /dxcluster.cgi?callsign=$l\&uid=$Internet::qrz_uid\&pw=$Internet::qrz_pw HTTP/1.0\n\n";
29 Log('call', "$call: show/qrz \U$l");
31 while (my $result = $t->getline) {
33 if ($state eq 'blank' && $result =~ /^\s*Callsign\s*:/i) {
35 } elsif ($state eq 'go') {
36 next if $result =~ /^\s*Usage\s*:/i;
42 push @out, $self->msg('e3', 'qrz.com', uc $l) unless @out;
44 push @out, $self->msg('e18', 'QRZ.com');