4 # Copyright (c) 1998 Dirk Koopman G1TLH
9 my ($self, $inline) = @_;
13 my $from = $self->call;
16 # analyse the line there are four situations...
20 # 4) talk call>node text
23 ($to, $via, $line) = $inline =~ /^\s*([A-Za-z0-9\-]+)\s*>([A-Za-z0-9\-]+)(.*)$/;
25 $line =~ s/\s+// if $line;
27 ($to, $line) = split /\s+/, $inline, 2;
31 $via = uc $via if $via;
32 my $call = $via ? $via : $to;
33 my $clref = DXCluster->get_exact($call); # try an exact call
34 my $dxchan = $clref->dxchan if $clref;
35 return (1, $self->msg('e7', $call)) unless $dxchan;
37 # if there is a line send it, otherwise add this call to the talk list
38 # and set talk mode for command mode
40 $dxchan->talk($self->call, $to, $via, $line) if $dxchan;
42 my $s = "$to>" . $dxchan->call;
43 my $ref = $self->talklist;
45 unless (grep { $_ eq $s } @$ref) {
46 $dxchan->talk($self->call, $to, $via, $self->msg('talkstart'));
51 $self->talklist([ $s ]);
52 $dxchan->talk($self->call, $to, $via, $self->msg('talkstart'));
53 push @out, $self->msg('talkinst');
56 push @out, $self->talk_prompt;