chiark / gitweb /
Include the message number in X-Webstump-Event
[modbot-mtm.git] / xlog / bin / record
index 1ba50b70ae543452a6e303297dbc9fcb0225a0e6..37a4236f2f820597e20329e505c9582c9f45420c 100755 (executable)
@@ -112,7 +112,10 @@ sub parse_mailout () {
            $message .= $line;
        }
        chomp;
-       $f{Event}= "notify $'" if m/^X-Webstump-Event:\s*/i; #';
+        if (m/^X-Webstump-Event:\s*(?:\[(\d+)\])?\s*/i) { #';
+            $f{Event}= "notify $'";
+            $f{MessageNum}= $1 if defined $1;
+        }
        last if m/^$/;
     }
     while (<STDIN>) {