Просмотр исходного кода

Another patch from Sam Bingner, small optimization.

Morten Brix Pedersen 25 лет назад
Родитель
Сommit
869ffc1dc9
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      pisg.pl

+ 2 - 4
pisg.pl

@@ -90,7 +90,7 @@ $timeoffset = "+0";		# A time offset on the stats page - if your
 # You shouldn't care about anything below this point
 $debug = 0;			# 0 = Debugging off, 1 = Debugging on
 $debugfile = "debug.log";	# Path to debug file(must be set if $debug == 1)
-$version = "v0.17-cvs";
+$version = "v0.18-cvs";
 
 my ($lines, $kicked, $gotkicked, $smile, $longlines, $time, $timestamp, %alias,
 $normalline, $actionline, $thirdline, @ignore, $line, $processtime, @topics,
@@ -331,10 +331,8 @@ sub parse_file
                     my $l = length($saying);
 
                     if ($l > $minquote && $l < $maxquote) {
-                        my $saying = htmlentities($saying);
-
                         # Creates $hash{nick}[n] - a hash of an array.
-                        push (@{ $sayings{$nick} }, $saying);
+                        push (@{ $sayings{$nick} }, htmlentities($saying));
                         $longlines{$nick}++;
                     }