added callsign to logging
[spider.git] / cmd / show / call.pl
index 92a99234c2819f227f5cfc4a7ad5ddd84fe3d9e6..d45f756c597eaa74f61054a9e8cac5cd1423eea5 100644 (file)
@@ -8,25 +8,29 @@
 my ($self, $line) = @_;
 my @list = split /\s+/, $line;               # generate a list of callsigns
 my $l;
+my $call = $self->call;
 my @out;
 
+return (1, "SHOW/CALL <callsign>, e.g. SH/CALL g1tlh") unless @list;
+
 use Net::Telnet;
 
 my $t = new Net::Telnet;
 
-push @out, $self->msg('call1');
+push @out, $self->msg('call1', 'AA6HF');
 foreach $l (@list) {
        $t->open(Host     =>  "jeifer.pineknot.com",
                         Port     =>  1235,
                         Timeout  =>  5);
        if ($t) {
                $t->print(uc $l);
+               Log('call', "$call: show/call $l");
                while (my $result = $t->getline) {
                        push @out,$result;
                }
                $t->close;
        } else {
-               push @out, $self->msg('e18', 'PineKnot');
+               push @out, $self->msg('e18', 'AA6HF');
        }
 }