2 # do an announce message
8 # at the moment these keywords are fixed, but I dare say a file containing valid ones
11 # Copyright (c) 1998 Dirk Koopman G1TLH
15 # Modified 13Dec98 Iain Phillips G0RDI
18 my ($self, $line) = @_;
19 my @f = split /\s+/, $line;
20 return (1, $self->msg('e5')) if $self->remotecmd;
21 return (1, $self->msg('e9')) if !@f;
22 return (1, $self->msg('e28')) unless $self->registered;
25 my @locals = DXCommandmode->get_all();
27 my $from = $self->call;
33 if ($sort eq "FULL") {
34 $line =~ s/^$f[0]\s+//; # remove it
36 } elsif ($sort eq "SYSOP") {
37 $line =~ s/^$f[0]\s+//; # remove it
38 @locals = map { $_->priv >= 5 ? $_ : () } @locals;
41 } elsif ($sort eq "LOCAL") {
42 $line =~ s/^$f[0]\s+//; # remove it
48 # change ^ into : for transmission
52 if (@bad = BadWords::check($line)) {
53 $self->badcount(($self->badcount||0) + @bad);
54 Log('DXCommand', "$self->{call} swore: $line");
55 Log('ann', $to, $from, "[to $from only] $line");
56 $self->send("To $to de $from <$t>: $line");
60 return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
61 Log('ann', $to, $from, $line);
62 DXChannel::broadcast_list("To $to de $from ($t): $line\a", 'ann', undef, @locals);
64 my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
65 DXChannel::broadcast_nodes($pc);