Torbjorn Svensson 20 lat temu
rodzic
commit
707dbb2e31
2 zmienionych plików z 4 dodań i 0 usunięć
  1. 1 0
      docs/Changelog
  2. 3 0
      modules/Pisg/Parser/Logfile.pm

+ 1 - 0
docs/Changelog

@@ -15,6 +15,7 @@ pisg (0.69) - ??
      + Fix tablewidthbug when running with multiplie outputs (thanks Daeron
        for this note).
      + Fix minortypo in HTMLGenerator.pm (thanks Daeron).
+     + Fix wordcount (thanks Daeron).
    Language Updates:
      + Portuguese: completed by DarkForce72.
      + Portuguese/Brazil: completed by Guilherme Barile.

+ 3 - 0
modules/Pisg/Parser/Logfile.pm

@@ -634,6 +634,9 @@ sub _parse_words
     my $tod = int($hour/6);
 
     foreach my $word (split(/[\s,!?.:;)(\"]+/o, $saying)) {
+        # ignore if $word is empty
+        next if $word eq "";
+
         $stats->{words}{$nick}++;
         $stats->{word_times}{$nick}[$tod]++;
         # remove uninteresting words