- $dxchan->inscript(1);
- my @out = DXCommandmode::run_cmd($dxchan, $l);
- $dxchan->inscript(0);
- if ($dxchan->can('send_ans')) {
- $dxchan->send_ans(@out);
- } else {
- dbg($_) for @out;
- }
+ $dxchan->inscript(1) if $self->{inscript};
+ push @out, DXCommandmode::run_cmd($dxchan, $l);
+ $dxchan->inscript(0) if $self->{inscript};