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 $addr = $self->hostname || '127.0.0.1';
21 Log('cmd', "$self->{call}|$addr|announce|$line");
22 my @f = split /\s+/, $line;
23 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
24 return (1, $self->msg('e9')) if !@f;
25 return (1, $self->msg('e28')) unless $self->isregistered;
29 my $from = $self->call;
36 if ($sort eq "FULL") {
37 $line =~ s/^$f[0]\s+//; # remove it
39 } elsif ($sort eq "SYSOP") {
40 $line =~ s/^$f[0]\s+//; # remove it
42 $via = $sysopflag = '*';
43 } elsif ($sort eq "LOCAL") {
44 $line =~ s/^$f[0]\s+//; # remove it
47 # if this is a 'bad spotter' user then ignore it
51 if ($DXProt::badspotter->in($nossid)) {
52 LogDbg('DXCommand', "bad spotter ($self->{call}) made announcement: $line");
58 if (@bad = BadWords::check($line)) {
59 $self->badcount(($self->badcount||0) + @bad);
60 LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")");
65 Log('ann', $to, $from, "[to $from only] $line");
66 $self->send("To $to de $from: $line");
70 #return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
71 Log('ann', $to, $from, $line);
72 $main::me->normal(DXProt::pc93($to, $from, $via, $line));
74 #DXChannel::broadcast_list("To $to de $from ($t): $line\a", 'ann', undef, @locals);
75 #if ($to ne "LOCAL") {
76 # my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
77 # DXChannel::broadcast_nodes($pc);