Article View: news.software.readers
Article #116346Re: [slrn] Different groups => different signatures
From: Lee J. Moore
Date: Sat, 21 Dec 2002 17:39
Date: Sat, 21 Dec 2002 17:39
53 lines
2840 bytes
2840 bytes
One may as well begin with wannes's letter to news.software.readers:
[..]
> What I want: When I post to an internal group (only visible on
> my ISP's newsservers), being 'pandora' and 'pandora.*', I want
> to use another .sig, pointing to the FAQ of those groups. In
> any other groups, just use my regular .sig
I wrote something like this whilst learning s-lang (which I
still am). Create a file called multisig.sl in your macros
directory, insert the script below, and call it from your
.slrnrc with 'interpret multisig.sl". Add new sigfiles to the
Sigs variable. If you want to use sig /home/user/thisfaq.txt as
the sig for comp.os.linux.misc, you'd add the line:
Sigs["comp.os.linux.misc"] = "/home/user/thisfaq.txt" to the
macro file. For newsgroups you haven't listed, it will use the
default sig defined in .slrnrc.
The macro follows:
% multisig.sl - an SLRN macro for assigning different sigs
% to different newsgroups.
%
% Copyright (C) 2002 Lee J. Moore <leej@dsl.pipex.com>
private variable
Sigs = Assoc_Type [];
Sigs["uk.test"] = "/path/to/sig1";
Sigs["news.software.readers"] = "/path/to/sig2";
variable default_sig;
define set_default_sig(){
default_sig = get_variable_value("signature");
}
define assign_sig(){
if (assoc_key_exists(Sigs, current_newsgroup()))
set_string_variable("signature", Sigs[current_newsgroup()]);
else
set_string_variable("signature", default_sig);
}
register_hook("startup_hook", "set_default_sig");
register_hook("followup_hook", "assign_sig");
register_hook("post_hook", "assign_sig");
--
Lee J. Moore
http://www.leej.dsl.pipex.com
Technical Details
Message-ID:
<slrnb099qr.2ge.leej@cafe.lan>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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fu-berlin.de!uni-berlin.de!userdg058.dsl.pipex.COM!not-for-mailReferences:
<slrnb094gb.29j.spam@wannes.cjb.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnb099qr.2ge.leej@cafe.lan> Subject: Re: [slrn] Different groups => different signatures Date: Sat, 21 Dec 2002 17:39:40 +0000 From: "Lee J. Moore" <leej@dsl.pipex.com> References: <slrnb094gb.29j.spam@wannes.cjb.net> 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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fu-berlin.de!uni-berlin.de!userdg058.dsl.pipex.COM!not-for-mail Newsgroups: news.software.readers Lines: 52 NNTP-Posting-Host: userdg058.dsl.pipex.com (62.190.230.58) X-Trace: fu-berlin.de 1040492380 3799267 62.190.230.58 (16 [129053]) X-Platform: Gentoo Linux (Portage 2.0.46-r2) X-Kernel: 2.4.19-gentoo-r10 X-Spam-Info: Incoming mail analysed and filtered by SpamAssassin X-Spam-Info: Detected SPAM submitted to Vipuls Razor User-Agent: slrn/0.9.7.4 (Linux)