make sh/contest async
[spider.git] / cmd / show / wm7d.pl
index 72e2d806275f957d2568c101bf21dc34c98c0f61..291823d7f8be2aa903844fb6d89130a37e48f4a2 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Copyright (c) 2002 Charlie Carroll K1XX
 #
-# $Id$
+#
 #
 
 # wm7d accepts only single callsign
@@ -16,12 +16,13 @@ my @out;
 # send 'e24' if allow in Internet.pm is not set to 1
 return (1, $self->msg('e24')) unless $Internet::allow;
 return (1, "SHOW/WM7D <callsign>, e.g. SH/WM7D k1xx") unless $line;
-my $target = 'www.wm7d.net';
+my $target = $Internet::wm7d_url || 'www.wm7d.net';
 my $port = 5000;
 my $cmdprompt = '/query->.*$/';
 
 my($info, $t);
-                                    
+
+use Net::Telnet;
 $t = new Net::Telnet;
 $info =  $t->open(Host    => $target,
                  Port    => $port,
@@ -38,6 +39,6 @@ if (!$info) {
        # Log the lookup
        Log('call', "$call: show/wm7d \U$line");
        $t->close;
-       push @out, $info;
+       push @out, split /[\r\n]+/, $info;
 }
 return (1, @out);