- for ($i = 0; @_; ) {
- my $str = "PC16^$self->{call}";
- for ( ; @_ && length $str < 200; $i++) {
- my $ref = shift;
- $str .= sprintf "^%s %s %d", $ref->call, $ref->confmode ? '*' : '-', $ref->here;
+ my $s = "";
+ for (@_) {
+ next unless $_;
+ my $ref = $_;
+ my $str = sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here;
+ if (length($s) + length($str) > $sentencelth) {
+ push @out, "PC16^$ncall" . $s . sprintf "^%s^", get_hops(16);
+ $s = "";