Index: trunk/tools/wikibugs/wikibugs |
— | — | @@ -53,19 +53,21 @@ |
54 | 54 | for ($body) { |
55 | 55 | # Use fancy lookahead magic to match comments in the form of |
56 | 56 | # "Foo <bar@baz.com>" or "bing@boop.com". |
57 | | - if ( m{^--- Comment #\d+ from (.+) <\S+\@.*}m ) { |
| 57 | + if ( m{^--- Comment #\d+ from (.*) ?<?\S+\@.*}m ) { |
58 | 58 | $user = $1; |
59 | | - } elsif ( m{^(.*) <(\S+)\@\S+> changed:$}m ) { |
| 59 | + $haschanges = 1; |
| 60 | + $comment = 1; |
| 61 | + } |
| 62 | + if ( m{^(.*) ?<?(\S+)\@\S+>? changed:$}m ) { |
60 | 63 | # Try to grab the "real name" again. |
61 | 64 | $haschanges = 1; |
62 | | - $user = $1; |
| 65 | + $user = $1 if !$user; |
63 | 66 | } else { |
64 | 67 | # If "real name" isn't available and we didn't get a user from the |
65 | 68 | # comment header, just use the "X-Bugzilla-Who" header. |
66 | 69 | my @who = split '@', $mail->header( 'X-Bugzilla-Who' ); |
67 | 70 | $user = $who[0]; |
68 | 71 | } |
69 | | - $comment = s/^--- Comment #\d+ from (?-s:.*?<)?(\S+)\@.*//ms; |
70 | 72 | } |
71 | 73 | |
72 | 74 | my @changed_fields = split /\s+/, $mail->header( 'X-Bugzilla-Changed-Fields' ); |
— | — | @@ -161,7 +163,7 @@ |
162 | 164 | if ($output) |
163 | 165 | { |
164 | 166 | open (OUT, ">>/var/wikibugs/wikibugs.log"); |
165 | | - # print $output; |
| 167 | + #print $output; |
166 | 168 | print OUT $output; |
167 | 169 | close OUT; |
168 | 170 | } |