🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #27513

Re: slrn: problem with slang macro and startup_hook

#27513
From: John E. Davis
Date: Wed, 06 Nov 1996 00:00
31 lines
1450 bytes
On 30 Oct 1996 19:36:32 GMT, Jason Costomiris <jcostom@shaft.sjis.com>
wrote:
>Ok, now I have:
>define starup_hook ()
>{
>	if (0 == strcmp (server_name (), "betanews.microsoft.com"))
>	{
>		set_string_variable("signature",".sig-ms");
>	}
>}

You should rename the function from starup_hook to startup_hook.

>if ($server_name =~ /betanews/) {
>	$signature = ".sig-ms";
>}
>
>Is there a similar construct for slang macros?

Sure.  Use:

    if (string_match (server_name (), "betanews", 1))
      set_string_variable ("signature", ".sig-ms");

-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis

Technical Details
Message-ID: <slrn58075s.jf8.davis@aluche.mit.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-mail
References: <slrn57ekoe.e3n.jcostom@dogbert.sjis.com> <slrn57eqt0.d1q.davis@aluche.mit.edu> <slrn57fbn6.ejs.jcostom@dogbert.sjis.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn58075s.jf8.davis@aluche.mit.edu>
Subject: Re: slrn: problem with slang macro and startup_hook
Date: Wed, 06 Nov 1996 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn57ekoe.e3n.jcostom@dogbert.sjis.com> <slrn57eqt0.d1q.davis@aluche.mit.edu> <slrn57fbn6.ejs.jcostom@dogbert.sjis.com>
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: 194788521
Organization: Center for Space Research
Reply-to: davis@space.mit.edu
Newsgroups: news.software.readers