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
12 my ($self, $line) = @_;
13 my $call = $self->call;
16 # send 'e24' if allow in Internet.pm is not set to 1
17 return (1, $self->msg('e24')) unless $Internet::allow;
18 return (1, "SHOW/WM7D <callsign>, e.g. SH/WM7D k1xx") unless $line;
19 my $target = $Internet::wm7d_url || 'www.wm7d.net';
21 my $cmdprompt = '/query->.*$/';
26 $info = $t->open(Host => $target,
31 push @out, $self->msg('e18', 'WM7D.net');
33 ## Wait for prompt and respond with callsign.
34 $t->waitfor($cmdprompt);
36 ($info) = $t->waitfor($cmdprompt);
39 Log('call', "$call: show/wm7d \U$line");
41 push @out, split /[\r\n]+/, $info;