]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix scores detection
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 Jul 2016 16:42:40 +0000 (17:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 Jul 2016 16:42:40 +0000 (17:42 +0100)
utils/rspamd_stats.pl

index d4223a7db6600fdf0549a3fdd88ba6bab9f37782..d5336f43d109dd0a5a691f1ae400f6b26419393f 100644 (file)
@@ -75,11 +75,11 @@ while(<$rspamd_log>) {
 
       if (scalar(@selected) > 0) {
         foreach my $sym (@selected) {
-          $sym =~ /^([^\(]+)(?:\(([^\)]+)\))?.*$/;
+          $sym =~ /^([^\(]+)(\(([^\)]+)\))?/;
           my $sym_name = $1;
           my $sym_score = 0;
           if ($2) {
-            my $sym_score = $2 * 1.0;
+            $sym_score = $3 * 1.0;
 
             if (abs($sym_score) < $diff_alpha) {
               next;