X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fannounce.pl;h=a3ccb5b033d7f98dc8a9044212c40f0c3e38dcdc;hb=9cc26cc7a73efb7679d3e8e819ba0019307f8607;hp=6b66d68eb9947dfb2c181bdac6bfb0d1863e1abb;hpb=9091f4b601f31027f4f7a36cd83af8f9ea8c2492;p=spider.git diff --git a/cmd/announce.pl b/cmd/announce.pl index 6b66d68e..a3ccb5b0 100644 --- a/cmd/announce.pl +++ b/cmd/announce.pl @@ -17,7 +17,7 @@ my ($self, $line) = @_; my @f = split /\s+/, $line; -return (1, $self->msg('e5')) if $self->remotecmd; +return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript; return (1, $self->msg('e9')) if !@f; return (1, $self->msg('e28')) unless $self->registered; @@ -48,10 +48,24 @@ if ($sort eq "FULL") { # change ^ into : for transmission $line =~ s/\^/:/og; +# if this is a 'bad spotter' user then ignore it +my $nossid = $from; +my $drop = 0; +$nossid =~ s/-\d+$//; +if ($DXProt::badspotter->in($nossid)) { + LogDbg('DXCommand', "bad spotter ($self->{call}) made announcement: $line"); + $drop++; +} + +# have they sworn? my @bad; if (@bad = BadWords::check($line)) { $self->badcount(($self->badcount||0) + @bad); - Log('DXCommand', "$self->{call} swore: $line"); + LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")"); + $drop++; +} + +if ($drop) { Log('ann', $to, $from, "[to $from only] $line"); $self->send("To $to de $from <$t>: $line"); return (1, ());