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;
26 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
39 $via = $sysopflag = '*';
40 } elsif ($sort eq "LOCAL") {
41 $line =~ s/^$f[0]\s+//; # remove it
44 # if this is a 'bad spotter' user then ignore it
48 if ($DXProt::badspotter->in($nossid)) {
49 LogDbg('DXCommand', "bad spotter ($self->{call}) made announcement: $line");
55 if (@bad = BadWords::check($line)) {
56 $self->badcount(($self->badcount||0) + @bad);
57 LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")");
62 Log('ann', $to, $from, "[to $from only] $line");
63 $self->send("To $to de $from: $line");
67 return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
68 Log('ann', $to, $from, $line);
69 $main::me->normal(DXProt::pc93($to, $from, $via, $line));
71 #DXChannel::broadcast_list("To $to de $from ($t): $line\a", 'ann', undef, @locals);
72 #if ($to ne "LOCAL") {
73 # my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
74 # DXChannel::broadcast_nodes($pc);