+ if (is_callsign($to)) {
+ # local talks
+ my $dxchan;
+ $dxchan = DXChannel::get($main::myalias) if $to eq $main::mycall;
+ $dxchan = DXChannel::get($to) unless $dxchan;
+ if ($dxchan && $dxchan->is_user) {
+ $dxchan->talk($from, $to, $via, $text, $onode);
+ return;
+ }
+
+ # convert to PC10 talks where appropriate
+ my $ref = Route::get($to);
+ if ($ref) {
+ # just go for the "best" one for now (rather than broadcast)
+ $dxchan = $ref->dxchan;
+# my @dxchan = $ref->alldxchan;
+# for $dxchan (@dxchan) {
+ if ($dxchan->{do_pc9x}) {
+ $dxchan->send($line);
+ } else {
+ $dxchan->talk($from, $to, $via, $text, $onode);
+ }
+# }
+ return;
+ }
+
+ # otherwise, drop through and allow it to be broadcast
+ } elsif ($to eq '*' || uc $to eq 'SYSOP' || uc $to eq 'WX') {
+ # announces
+ my $sysop = uc $to eq 'SYSOP' ? '*' : ' ';
+ my $wx = uc $to eq 'WX' ? '1' : '0';
+ my $local = $via eq 'LOCAL' ? '*' : $via;
+
+ $self->send_announce(1, pc12($from, $text, $local, $via, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef);
+ return if $via eq 'LOCAL';
+ } else {
+ # chat messages to non-pc9x nodes
+ $self->send_chat(1, pc12($from, $text, undef, $to, undef, $pcall), $from, '*', $text, $to, $pcall, '0');