Morten Brix Pedersen пре 24 година
родитељ
комит
3d5d65a9f6
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      docs/Changelog
  2. 1 1
      modules/Pisg/Parser/Logfile.pm

+ 3 - 0
docs/Changelog

@@ -1,6 +1,9 @@
 pisg (x.xx)
 pisg (x.xx)
    * SortByWords option added (thanks, Matthew Cheetah Gabeler-Lee
    * SortByWords option added (thanks, Matthew Cheetah Gabeler-Lee
      <msg2@po.cwru.edu>)
      <msg2@po.cwru.edu>)
+   * Foul-words matching is now more strict. It no longer matches inside a
+     word, but only in the end or at the start of a word (thanks, Matthew
+     Cheetah Gabeler-Lee <msg2@po.cwru.edu>)
 
 
 pisg (0.38) - Thu Apr, 25th 2002
 pisg (0.38) - Thu Apr, 25th 2002
    * Grammar fixes in documentation (thanks, Azhrarn <diablo2@krock.com>)
    * Grammar fixes in documentation (thanks, Azhrarn <diablo2@krock.com>)

+ 1 - 1
modules/Pisg/Parser/Logfile.pm

@@ -271,7 +271,7 @@ sub _parse_file
                     }
                     }
 
 
                     $stats->{foul}{$nick}++
                     $stats->{foul}{$nick}++
-                        if ($saying =~ /$self->{cfg}->{foulwords}/io);
+                        if ($saying =~ /(\b$self->{cfg}->{foulwords}|$self->{cfg}->{foulwords}\b)/io);
 
 
                     # Who smiles the most?
                     # Who smiles the most?
                     # A regex matching al lot of smilies
                     # A regex matching al lot of smilies