add some extra default badwords
authorDirk Koopman <djk@tobit.co.uk>
Wed, 23 Nov 2022 15:32:52 +0000 (15:32 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 23 Nov 2022 15:32:52 +0000 (15:32 +0000)
cmd/Commands_en.hlp
data/badword.new.issue
perl/BadWords.pm

index 7f5f3dbb825691e00d3ef011b6e3ec492b64828b..3bef48cd754d7a1dadcffbe5f6d4ca681b35ad4c 100644 (file)
@@ -1660,14 +1660,18 @@ like this:
 
 but it will also stop things like this:
 
-  anihilate annni11ihhh ii lllattt eee ddd
+  anihilate annni11ihhh ii lllattt eee
 
 A few common 'leet' substitutions are automatically matched:
 
-  b0ll0cks bo0lll0ccckks fr1iig
+  b0ll0cks bo0lll0ccckks fr1iigging
 
 and so on
 
+It will not stop some things like:
+
+  The base word FRIG will stop 'friiigging' but not 'friiig ging'
+
 === 6^UNSET/BADWORD <word>..^Propagate things like this word again
 This is the opposite of set/badword <word>
 
@@ -2173,10 +2177,15 @@ for more information.
 Display all the bad spotter's callsigns in the system, see SET/BADSPOTTER
 for more information.
 
-=== 1^SHOW/BADWORD^Show all the bad words in the system
+=== 6^SHOW/BADWORD^Show all the bad words in the system
+=== 6^SHOW/BADWORD full^Show all badwords with their Regex
 Display all the bad words in the system, see SET/BADWORD
 for more information.
 
+The first form shows all the base words that are stored in a simple list.
+
+The second form show each word with its associated perl regex.
+
 === 0^SHOW/BANDS [band|region names]^Show the list of bands and regions
 Display the bands and regions (collections of bands) known to
 the system. If you supply band or region names to SHOW/BANDS,
index a0d897d8f1de43ce7ea7f78ad019e6acfbedbea7..ee9f23e908413ecb848362bc23e3e089d3308458 100644 (file)
@@ -46,6 +46,7 @@ ENVIDIOSO
 ESTUPIDO
 EXPLOSIVE
 FOLA
+FRIG
 FUCK
 FUK
 FUNKER
@@ -107,6 +108,7 @@ SHIT
 SLAG
 SLAUGHTER
 SLAVE
+SLUT
 SOD
 SPOTWAR
 STOPUTIN
index 09911b4ad5748bfde84a4e502aac9a823c044c48..446bcf1e4f06ca9996504bcbd3445971c27bde80 100644 (file)
@@ -135,7 +135,7 @@ sub generate_regex
        my $res;
        @relist = sort {$a->[0] cmp $b->[0]} @relist;
        for (@relist) {
-               $res .= qq{(?:$_->[1]) |\n};
+               $res .= qq{\\b(?:$_->[1]) |\n};
        }
        $res =~ s/\s*\|\s*$//;
        $regex = qr/\b($res)/x;
@@ -211,7 +211,7 @@ sub check
        
        if ($regex) {
                my %uniq;
-               @out = grep {++$uniq{$_}; $uniq{$_} == 1 ? $_ : undef }($s =~ /\b($regex)/g);
+               @out = grep {++$uniq{$_}; $uniq{$_} == 1 ? $_ : undef }($s =~ /($regex)/g);
                dbg("BadWords: check '$s' = '" . join(', ', @out) . "'") if isdbg('badword');
                return @out;
        }