chiark / gitweb /
Make noack honoured for approvals too
[modbot-mtm.git] / stump / bin / logArt
1 #!/usr/bin/perl
2
3 $MNG_ROOT=$ENV{'MNG_ROOT'};
4
5 $date = `date`; chop $date;
6
7 print STDERR "Activity: $date $ARGV[0] "; shift @ARGV;
8
9 ######################################################################
10 # Getting data
11 sub readMessage {
12   $IsBody = 0;
13   
14   while( <> ) {
15
16     chop;
17   
18     if( /^$/ ) {
19       $IsBody = 1;
20     }
21   
22     if( !$IsBody ) {
23   
24       if( /^Newsgroups: / ) {
25         $Newsgroups = $_;
26       } elsif( /^Subject: / ) {
27         $Subject = $_;
28       } elsif( /^From: / ) {
29         $From = $_;
30       } elsif( /^Path: / ) {
31         $Path = $_;
32       } elsif( /^Keywords: / ) {
33         $Keywords = $_;
34       } elsif( /^Summary: / ) {
35         $Summary = $_;
36       } elsif( /^Message-ID: / ) {
37         $Message_ID = $_;
38       }
39   
40     }
41   }
42 }
43
44 &readMessage;
45
46 print STDERR "$Message_ID, $Subject from $From \n";