chiark / gitweb /
wip make it compile
[inn-innduct.git] / scripts / innreport_inn.pm
index d2943fe7bf329bb14e8748e8568f409290e074aa..4043f3ee4e609ce0d4941576a5e891c6f91b8b8a 100644 (file)
@@ -440,8 +440,8 @@ sub collect {
     # The exact timers change from various versions of INN, so try to deal
     # with this in a general fashion.
     if ($left =~ m/^\S+\s+                         # ME
-                  time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+                  time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $innd_time_times += $1;
       my $timers = $2;
@@ -719,8 +719,8 @@ sub collect {
     # ME time X nnnn X(X) [...]
     return 1 if $left =~ m/backlogstats/;
     if ($left =~ m/^\S+\s+                         # ME
-                   time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+                   time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $innfeed_time_times += $1;
       my $timers = $2;
@@ -1459,8 +1459,8 @@ sub collect {
     # The exact timers change from various versions of INN, so try to deal
     # with this in a general fashion.
     if ($left =~ m/^\S+\s+                         # ME
-                  time\ (\d+)\s+                  # time
-                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
+                  time\s(\d+)\s+                  # time
+                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
                    $/ox) {
       $nnrpd_time_times += $1;
       my $timers = $2;
@@ -1683,13 +1683,28 @@ sub collect {
       $nocem_totalids{$nocem_lastid} += $2;
       return 1;
     }
-    if ($left =~ /bad signature from (.*)/o) {
+    if ($left =~ /Article <[^>]*>: (.*) \(ID [[:xdigit:]]*\) not in keyring/o) {
+       $nocem_badsigs{$1}++;
+       $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
+       $nocem_totalbad++;
+       $nocem_lastid = $1;
+       return 1;
+     }
+    if ($left =~ /Article <[^>]*>: bad signature from (.*)/o) {
       $nocem_badsigs{$1}++;
       $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
       $nocem_totalbad++;
       $nocem_lastid = $1;
       return 1;
     }
+    if ($left =~ /Article <[^>]*>: malformed signature/o) {
+      $nocem_badsigs{'N/A'}++;
+      $nocem_goodsigs{'N/A'} = 0 unless ($nocem_goodsigs{'N/A'});
+      $nocem_totalbad++;
+      $nocem_lastid = 'N/A';
+      return 1;
+    }
+
     return 1;
   }