-# send out the talk messages taking into account vias and connectivity
-sub send_talks
-{
- my ($self, $ent, $line) = @_;
-
- my ($to, $via) = $ent =~ /(\S+)>(\S+)/;
- $to = $ent unless $to;
- my $call = $via && $via ne '*' ? $via : $to;
- my $clref = Route::get($call);
- my $dxchan = $clref->dxchan if $clref;
- if ($dxchan) {
- $dxchan->talk($self->{call}, $to, undef, $line);
- } else {
- $self->send($self->msg('disc2', $via ? $via : $to));
- my @l = grep { $_ ne $ent } @{$self->{talklist}};
- if (@l) {
- $self->{talklist} = \@l;
- } else {
- delete $self->{talklist};
- $self->state('prompt');
- }
- }
-}
-
-sub send_chats
-{
- my $self = shift;
- my $target = shift;
- my $text = shift;
-
- my $msgid = DXProt::nextchatmsgid();
- $text = "#$msgid $text";
- my $ipaddr = alias_localhost($self->hostname || '127.0.0.1');
- $main::me->normal(DXProt::pc93($target, $self->{call}, undef, $text, undef, $ipaddr));
-}