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 || $self->inscript;
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
51 # if this is a 'bad spotter' user then ignore it
55 if ($DXProt::badspotter->in($nossid)) {
56 LogDbg('DXCommand', "bad spotter ($from) announcement: $line");
62 if (@bad = BadWords::check($line)) {
63 $self->badcount(($self->badcount||0) + @bad);
64 LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")");
69 Log('ann', $to, $from, "[to $from only] $line");
70 $self->send("To $to de $from <$t>: $line");
74 return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
75 Log('ann', $to, $from, $line);
76 DXChannel::broadcast_list("To $to de $from ($t): $line\a", 'ann', undef, @locals);
78 my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
79 DXChannel::broadcast_nodes($pc);