2 # Query the WM7D Database server for a callsign
4 # Largely based on "sh/qrz" and info in the Net::Telnet documentation
6 # Copyright (c) 2002 Charlie Carroll K1XX
11 # wm7d accepts only single callsign
15 my ($self, $line) = @_;
16 my $call = $self->call;
19 # send 'e24' if allow in Internet.pm is not set to 1
20 return (1, $self->msg('e24')) unless $Internet::allow;
21 return (1, "SHOW/WM7D <callsign>, e.g. SH/WM7D k1xx") unless $line;
22 my $target = $Internet::wm7d_url || 'www.wm7d.net';
24 my $cmdprompt = '/query->.*$/';
29 $info = $t->open(Host => $target,
34 push @out, $self->msg('e18', 'WM7D.net');
37 ## Wait for prompt and respond with callsign.
38 $t->waitfor($cmdprompt);
40 ($info) = $t->waitfor($cmdprompt);
43 Log('call', "$call: show/wm7d \U$line");
45 push @out, split /[\r\n]+/, $info;