소스 검색

Chop lines added to sayings to the length of maxquote (so we don't have super long quotes showing up)

sbingner 24 년 전
부모
커밋
fe04771bb4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/Pisg/Parser/Logfile.pm

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

@@ -251,7 +251,7 @@ sub _parse_file
                     } elsif (!$lines->{sayings}{$nick}) {
                         # Just fill the users first saying in if he hasn't
                         # said anything yet, to get rid of empty quotes.
-                        push @{ $lines->{sayings}{$nick} }, $saying;
+                        push @{ $lines->{sayings}{$nick} }, substr($saying, 0, $self->{cfg}->{maxquote});
                     }
 
                     $stats->{lengths}{$nick} += $len;