Article View: news.software.readers
Article #44263Re: Slrn/Auto Headers?
From: Jan Hlavacek
Date: Wed, 04 Nov 1998 00:00
Date: Wed, 04 Nov 1998 00:00
38 lines
2453 bytes
2453 bytes
On 4 Nov 1998 02:26:40 GMT, Bek Oberin <gossamer@netizen.com.au> wrote:
>
> I'm having trouble with setting headers on a by-group basis. I've
> got some hooks like this (sorry for the length of the paste):
>
> define set_headers_from_newsgroup ()
> {
> if (is_substr(current_newsgroup(), ".recovery"))
> {
> set_headers_to(strcat(header_default, "\n",
> header_x_no_ahbou, "\n",
> header_mail_copies_to_yes, "\n",
> header_approved));
strcat only takes two arguments, so it will return "\n" + header_approved
and left the rest of trings sitting on the stack. So not only that you
get only the last header, you are also slowly filling your stack,
which will eventually overflow if you change group too often. Try to do
this instead:
set_headers_to(header_default + "\n" +
header_x_no_ahbou + "\n" +
header_mail_copies_to_yes + "\n" +
header_approved);
or
set_headers_to(create_delimited_string("\n", header_default,
header_x_no_ahbou,
header_mail_copies_to_yes,
header_approved, 4));
--
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.ohio-state.edu> (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/
Technical Details
Message-ID:
<slrn73vi5f.d2.lahvak@math.mps.ohio-state.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn73ver0.djt.gossamer@netizen.com.au>Show Full Headers
Complete Article Headers
Message-ID: <slrn73vi5f.d2.lahvak@math.mps.ohio-state.edu> Subject: Re: Slrn/Auto Headers? Date: Wed, 04 Nov 1998 00:00:00 +0000 From: lahvak@math.mps.ohio-state.edu (Jan Hlavacek) References: <slrn73ver0.djt.gossamer@netizen.com.au> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 408164179 X-Complaints-To: usenet@math.ohio-state.edu X-Trace: mathserv.mps.ohio-state.edu 910149807 76 128.146.111.30 (4 Nov 1998 03:23:27 GMT) Organization: Department of Mathematics, The Ohio State University User-Agent: slrn/0.9.5.3 (UNIX) Reply-To: lahvak@math.mps.ohio-state.edu NNTP-Posting-Date: 4 Nov 1998 03:23:27 GMT Newsgroups: news.software.readers