Article View: news.software.readers
Article #51644Re: SLRN - different signatures
From: Smylers
Date: Tue, 07 Sep 1999 00:00
Date: Tue, 07 Sep 1999 00:00
59 lines
2897 bytes
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
Technical Details
Message-ID:
<1999Sep7.100021.16071@leeds.ac.uk>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:
<slrn7t9l62.fci.mads@null-b.iteration-x.dk>Show Full Headers
Complete Article Headers
Message-ID: <1999Sep7.100021.16071@leeds.ac.uk> Subject: Re: SLRN - different signatures Date: Tue, 07 Sep 1999 00:00:00 +0000 From: smylers@scs.leeds.ac.uk (Smylers) References: <slrn7t9l62.fci.mads@null-b.iteration-x.dk> 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: 522037620 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 User-Agent: slrn/0.9.5.6 (UNIX) Newsgroups: news.software.readers Originator: smylers@linux.leeds.ac.uk