… | |
… | |
31 | print uc(strmsglevel($_[1])),": $msg\n"; |
31 | print uc(strmsglevel($_[1])),": $msg\n"; |
32 | }); |
32 | }); |
33 | |
33 | |
34 | SetFileNameCallback sub { |
34 | SetFileNameCallback sub { |
35 | return unless $_[1]; # skip "Re:"-plies et al. |
35 | return unless $_[1]; # skip "Re:"-plies et al. |
36 | my ($subject, $filename) = @_; |
36 | local _$ = $_[0]; |
|
|
37 | |
|
|
38 | # the following rules are rather effective on some newsgroups, |
|
|
39 | # like alt.binaries.games.anime, where non-mime, uuencoded data |
|
|
40 | # is very common |
|
|
41 | |
37 | ## if we find some *.rar, take it |
42 | # if we find some *.rar, take it |
38 | return $1 if $subject =~ /(\S+\.(?:[rstuvwxyz]\d\d|rar))\s/i; |
43 | return $1 if /(\S+\.(?:[rstuvwxyz]\d\d|rar))\s/i; |
|
|
44 | |
|
|
45 | # - filename.par (04/55) |
|
|
46 | return $1 if /- "?(\S+\.\S+?)"? (:yenc )?\(\d+\/\d+\)/i; |
|
|
47 | |
39 | # otherwise just pass what we have |
48 | # otherwise just pass what we have |
40 | return (); |
49 | return (); |
41 | }; |
50 | }; |
42 | |
51 | |
43 | |
52 | |