🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by Jan Hlavacek Wed, 04 Nov 1998 00:00
Re: Slrn/Auto Headers?
#44263
Author: Jan Hlavacek
Date: Wed, 04 Nov 1998 00:00
38 lines
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/

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads