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) = @_;
20 my @f = split /\s+/, $line;
21 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
22 return (1, $self->msg('e9')) if !@f;
23 return (1, $self->msg('e28')) unless $self->registered;
27 my $from = $self->call;
34 if ($sort eq "FULL") {
35 $line =~ s/^$f[0]\s+//; # remove it
37 } elsif ($sort eq "SYSOP") {
38 $line =~ s/^$f[0]\s+//; # remove it
40 $via = $sysopflag = '*';
41 } elsif ($sort eq "LOCAL") {
42 $line =~ s/^$f[0]\s+//; # remove it
45 # if this is a 'bad spotter' user then ignore it
49 if ($DXProt::badspotter->in($nossid)) {
50 LogDbg('DXCommand', "bad spotter ($self->{call}) made announcement: $line");
56 if (@bad = BadWords::check($line)) {
57 $self->badcount(($self->badcount||0) + @bad);
58 LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")");
63 Log('ann', $to, $from, "[to $from only] $line");
64 $self->send("To $to de $from: $line");
68 #return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
69 Log('ann', $to, $from, $line);
70 $main::me->normal(DXProt::pc93($to, $from, $via, $line));
72 #DXChannel::broadcast_list("To $to de $from ($t): $line\a", 'ann', undef, @locals);
73 #if ($to ne "LOCAL") {
74 # my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
75 # DXChannel::broadcast_nodes($pc);