4 # Copyright (c) 1998 Dirk Koopman G1TLH
9 my ($self, $inline) = @_;
13 my $from = $self->call;
15 return (1, $self->msg('e5')) if $self->remotecmd;
17 # analyse the line there are four situations...
21 # 4) talk call>node text
24 ($to, $via, $line) = $inline =~ /^\s*([A-Za-z0-9\-]+)\s*>([A-Za-z0-9\-]+)(.*)$/;
26 $line =~ s/\s+// if $line;
28 ($to, $line) = split /\s+/, $inline, 2;
32 $via = uc $via if $via;
33 my $call = $via ? $via : $to;
34 my $clref = DXCluster->get_exact($call); # try an exact call
35 my $dxchan = $clref->dxchan if $clref;
36 return (1, $self->msg('e7', $call)) unless $dxchan;
38 # if there is a line send it, otherwise add this call to the talk list
39 # and set talk mode for command mode
42 if (@bad = BadWords::check($line)) {
43 return (1, $self->msg('e17', @bad));
45 $dxchan->talk($self->call, $to, $via, $line) if $dxchan;
48 $s .= ">$via" if $via;
49 my $ref = $self->talklist;
51 unless (grep { $_ eq $s } @$ref) {
52 $dxchan->talk($self->call, $to, $via, $self->msg('talkstart'));
57 $self->talklist([ $s ]);
58 $dxchan->talk($self->call, $to, $via, $self->msg('talkstart'));
59 push @out, $self->msg('talkinst');
62 push @out, $self->talk_prompt;