Article View: news.software.nntp
Article #22447Re: Perl-hook abuse
From: Jeff Garzik
Date: Thu, 16 Oct 1997 00:00
Date: Thu, 16 Oct 1997 00:00
35 lines
1553 bytes
1553 bytes
(cc'd to author)
Andreas Steffan <deas@dont.spam.me.rrz.uni-hamburg.de> wrote:
>Since I'm tired of searching the usenet for Follow-ups on my articles,
>I considered INN's perl-hook for doing the job.
>I modified filter_nnrpd.pl to log the Message-ID's of my postings to disk.
>Since I use rnews to feed INN, I wonder if its possible to make an
>array containg these Message-ID's available to the filter_art function
>in filter-innd.pl without opening/closing the file in that function.
>I don't want to the latter, since that would be done for each article,
>and therefore cause unnecessary load.
I'm still not sure what you actually want to do here :), but you can
use the Perl hook's filter_mode function for opening and closing
files. The code would look something like
filter_mode {
if ( %mode {'NewMode'} =~ /running/io ) {
# open file....
} else {
# close file....
}
}
Just make sure you throttle innd before shutdown!
Jeff
Technical Details
Message-ID:
<625hqi$thj$1@havoc.gtf.gatech.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<625jp2$jiu$1@mortimer.deas.org>Show Full Headers
Complete Article Headers
Message-ID: <625hqi$thj$1@havoc.gtf.gatech.edu> Subject: Re: Perl-hook abuse Date: Thu, 16 Oct 1997 00:00:00 +0000 From: Jeff Garzik <jeff.garzik@spinne.com> References: <625jp2$jiu$1@mortimer.deas.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 281458803 Sender: garzik@havoc.gtf.gatech.edu Organization: Very Slack Newsgroups: news.software.nntp