}
}
push @out, $self->msg('e3', "sh/dx", "'$line'") unless @out;
- $dxchan->send(@out);
+ return @out;
});
#my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint, $dofilter ? $self : undef);
}
push (@out, "-");
}
- $self->send(@out) if @out;
+ return @out;
});
# my @chatlog = DXLog::print(undef, $to, $main::systime, 'chat', undef);
return;
}
if ($cb) {
- $cb->($dxchan, @res);
- } else {
- return unless @res;
+ # transform output if required
+ @res = $cb->($dxchan, @res);
+ }
+ if (@res) {
if (defined $prefix) {
$dxchan->send(map {"$prefix$_"} @res);
} else {