🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by Mads Tue, 07 Sep 1999 00:00
SLRN - different signatures
#51656
Author: Mads
Date: Tue, 07 Sep 1999 00:00
14 lines
1077 bytes
Hi,

Could anyone tell me if it's possible to specify
different signature-files in SLRN based on the
group in which the posting is made?

For instance using a regexp or wildmat pattern.
I wasn't able to find any info in the man-page.


-- 
Mads Hein � <mads@sjuft.dk>

Re: SLRN - different signatures
#51644
Author: Smylers
Date: Tue, 07 Sep 1999 00:00
59 lines
2897 bytes
Mads <mads@blaastue.dk> uttered something along the lines of:

> Could anyone tell me if it's possible to specify
> different signature-files in SLRN based on the
> group in which the posting is made?

Yes, but it involves an S-Lang macro.  In my .slrnrc I achieve this (plus a
little more) with:

  interpret "FollowUp.sl"

where that file is:

  % Note the followup_string set in .slrnrc:
  variable Default_followup_string;
  Default_followup_string = get_variable_value("followup_string");

  define followup_hook()
  {
    % Start with the default follow�up string:
    variable This_followup_string;
    This_followup_string = Default_followup_string;

    % If we're using the local news server, then omit peoples' e-mail addresses:
    if (is_substr(server_name(), "lnntp.scs"))
      if (str_replace(This_followup_string, " <%f>", ""))
        This_followup_string = ();

    % If we're following-up to a group that didn't carry the parent article, then
    % indicate the original newsgroup line at the start of the attribution:
    !if (is_substr(extract_article_header("Newsgroups"), extract_article_header("Followup-To")))
      This_followup_string = "In %n, " + This_followup_string;
    
    % If I'm quoting myself, then make this obvious:
    if (is_substr(extract_article_header("From"), "Smylers"))
      if (str_replace(This_followup_string, "%r", "I"))
        This_followup_string = ();

    set_string_variable("followup_string", This_followup_string);

    % Include my ULY geek code just in that newsgroup:
    if (is_substr(extract_article_header("Newsgroups"), "uk.local.yorkshire"))
      set_string_variable("signature", "Things/ULYSig");
    else
      set_string_variable("signature", "Things/NonExistentFile");
  }

Hopefully the comments make it self-explanatory.

It's just occurred to me that while messing around with followup_string only
needs to happen with follow-ups (obviously), setting the sig really should
happen when starting new threads, too.  Presumably there's another hook that
could be used for doing this -- look in the SLRN functions S-Lang
documentation if you're interested.

Smylers


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