Morten Brix Pedersen 24 лет назад
Родитель
Сommit
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)
    * SortByWords option added (thanks, Matthew Cheetah Gabeler-Lee
      <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
    * 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}++
-                        if ($saying =~ /$self->{cfg}->{foulwords}/io);
+                        if ($saying =~ /(\b$self->{cfg}->{foulwords}|$self->{cfg}->{foulwords}\b)/io);
 
                     # Who smiles the most?
                     # A regex matching al lot of smilies