add if you swear 3 or more times you are unceremoniously logged out
[spider.git] / cmd / announce.pl
index a7edb6c076cab7d84bcdd5cd78fb39138bd4258c..d2755b2df46309014c1b657e717baa94376992f4 100644 (file)
@@ -31,17 +31,17 @@ my $sysopflag;
 
 if ($sort eq "FULL") {
   $line =~ s/^$f[0]\s+//;    # remove it
-  $to = "All";
+  $to = "ALL";
 } elsif ($sort eq "SYSOP") {
   $line =~ s/^$f[0]\s+//;     # remove it
   @locals = map { $_->priv >= 5 ? $_ : () } @locals;
-  $to = "Sysop";
+  $to = "SYSOP";
   $sysopflag = '*';
 } elsif ($sort eq "LOCAL") {
   $line =~ s/^$f[0]\s+//;     # remove it
-  $to = "Local";
+  $to = "LOCAL";
 } else {
-  $to = "Local";
+  $to = "LOCAL";
 }
 
 # change ^ into : for transmission
@@ -49,15 +49,16 @@ $line =~ s/\^/:/og;
 
 my @bad;
 if (@bad = BadWords::check($line)) {
+       $self->badcount(($self->badcount||0) + @bad);
        return (1, $self->msg('e17', @bad));
 }
 
 return (1, $self->msg('dup')) if AnnTalk::dup($from, $toflag, $line);
 Log('ann', $to, $from, $line);
-DXProt::broadcast_list("To $to de $from <$t>: $line", 'ann', undef, @locals);
-if ($to ne "Local") {
+DXChannel::broadcast_list("To $to de $from <$t>: $line", 'ann', undef, @locals);
+if ($to ne "LOCAL") {
   my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 0);
-  DXProt::broadcast_ak1a($pc);
+  DXChannel::broadcast_nodes($pc);
 }
 
 return (1, ());