🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Ken Keen Tue, 07 Apr 1998 00:00
slrn: Multiple NewsServers again
#40009
Author: Ken Keen
Date: Tue, 07 Apr 1998 00:00
93 lines
3397 bytes
[I'm sorry if some of you received this twice -- I cancelled the original as I
neglected to put in the "slrn:" prefix in the subject]

I have read the doc, FAQ, etc. and have searched Deja News and have monitored
this newsgroup for about two months.

Here is what I found at  
http://x4.dejanews.com/getdoc.xp?AN=135396074&CONTEXT=891980808.1925709

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
Subject:      slrn: customization hints
From:         davis@space.mit.edu (John E. Davis)
Date:         1996/01/16
Message-ID:   <slrn4fnj44.bkb.davis@wiwaxia.mit.edu>
Newsgroups:   news.software.readers,alt.lang.s-lang

[snip]

Finally note that slrn may be specified with the -D command line option.
This allows one to define additional preprocessing tokens and then use these
in conjunction with #ifdef preprcessing.  For example, consider the
following .slrnrc file:

#ifdef NERD
 server "my.news.server" ".newsrc-nerd"
 organization "Nerds Only"
 signature ".nerd-signature"
#else
 server "my.news.server" ".newsrc"
 organization "State College"
 signature ".signature"
#endif

If slrn is started as:

    slrn -DNERD

the first set of setting will be used.  If started without the -DNERD
command line parameter, the second set will be used.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

I setup two ksh function definitions (I use function defintions extensively):

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
altopia () {
 /usr/local/bin/slrn0.9.4.6 -DALTOPIA
 }
myhome () {
 /usr/local/bin/slrn0.9.4.6 -DMYHOME
 }
* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

In my slrnrc:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
#ifdef ALTOPIA

 nnrpaccess news.alt.net MyAltNetName MyAltNetPassword
 server "news.alt.net" ".jnewsrc"

 hostname "Dangerous.Kitchen"
 set username "TroubleEveryDay"
 set realname "Ken Keen"
 set replyto  "TroubleEveryDay@Dangerous.Kitchen"
 set organization "Society for the Preservation of Soft Little Things"
 set signature "Man from Utopia"

#else
 server "news.myhomeserver.com" ".newsrc"
 hostname "myhomeserver.com"
 set username "MyHomeUserName"
 set realname "MyHomeRealName"
 set replyto  "MyHomeAddress"
 set organization "MyHomeOrg"
 set signature "MyHomeSig"
#endif
* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

MyHomeServer is my primary ISP with its own server.

When I run myhome, all works well (ie. the #else kicked in).

When I run altopia, it continues to use news.myhomeserver.com
vs.news.alt.net. I.e., the #else kiked in again. It appears that either the
-DALTOPIA isn't taking or the #ifdef ALTOPIA isn't being processed (probably
the former).

Any thoughts?



Re: slrn: Multiple NewsServers again
#39989
Author: Jan Hlavacek
Date: Tue, 07 Apr 1998 00:00
118 lines
4593 bytes
On 7 Apr 1998 21:28:13 GMT, Ken Keen <TroubleEveryDay@Dangerous.Kitchen>
wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> 
> MyHomeServer is my primary ISP with its own server.
> 
> When I run myhome, all works well (ie. the #else kicked in).
> 
> When I run altopia, it continues to use news.myhomeserver.com
> vs.news.alt.net. I.e., the #else kiked in again. It appears that either the
> -DALTOPIA isn't taking or the #ifdef ALTOPIA isn't being processed (probably
> the former).

The reason is that the "server" command in your .slrnrc does not do what
you expect it to do.  The server command should be called something like
"map_server_to_newsrc_file".  The command

server "news.alt.net" ".jnewsrc"

just tells slrn to use .jnewsrc as the newsrc file every time you
connect to the "news.alt.net" server.

Instead,  you want to do this:

Setup two ksh function definitions 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
altopia () {
 /usr/local/bin/slrn0.9.4.6 -DALTOPIA --nntp -h news.alt.net
 }
myhome () {
 /usr/local/bin/slrn0.9.4.6 -DMYHOME --nntp -h my.homeserver.com
 }
* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

In your slrnrc:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

nnrpaccess news.alt.net MyAltNetName MyAltNetPassword
server "news.alt.net" ".jnewsrc"
server "news.myhomeserver.com" ".newsrc"

#ifdef ALTOPIA
 hostname "Dangerous.Kitchen"
 set username "TroubleEveryDay"
 set realname "Ken Keen"
 set replyto  "TroubleEveryDay@Dangerous.Kitchen"
 set organization "Society for the Preservation of Soft Little Things"
 set signature Man.from.Utopia.sig.file  % this is a file name
#else
 hostname "myhomeserver.com"
 set username "MyHomeUserName"
 set realname "MyHomeRealName"
 set replyto  "MyHomeAddress"
 set organization "MyHomeOrg"
 set signature MyHomeSig.sig.file
#endif

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

If you don't insist on seting the hostname,  it can be done this way:

Setup two ksh function definitions 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 
altopia () {
 /usr/local/bin/slrn0.9.4.6 --nntp -h news.alt.net
 }
myhome () {
 /usr/local/bin/slrn0.9.4.6 --nntp -h my.homeserver.com
 }
* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

In your slrnrc:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

nnrpaccess news.alt.net MyAltNetName MyAltNetPassword
server "news.alt.net" ".jnewsrc"
server "news.myhomeserver.com" ".newsrc"

interpret .slrn.sl

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

and in your .slrn.sl

* * * * * * * * * * * * * * * * * * * * * * * * * * * * 

define startup_hook ()
{
 switch (server_name ())
 {case "news.alt.net" :
     set_string_variable ("username", "TroubleEveryDay");
     set_string_variable ("realname", "Ken Keen");
     set_string_variable ("replyto",  "TroubleEveryDay@Dangerous.Kitchen");
     set_string_variable ("organization", 
                     "Society for the Preservation of Soft Little Things");
     set_string_variable ("signature", "Man.from.Utopia.sig.file");}
 {case "my.homeserver.com" :
     set_string_variable ("username", "MyHomeUserName");
     set_string_variable ("realname", "MyHomeRealName");
     set_string_variable ("replyto",  "MyHomeAddress");
     set_string_variable ("organization", "MyHomeOrg");
     set_string_variable ("signature", MyHomeSig.sig.file);}
 {message ("Unknown server!\n");}
}

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-- 
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/

Re: slrn: Multiple NewsServers again
#40044
Author: Ken Keen
Date: Thu, 09 Apr 1998 00:00
27 lines
1233 bytes
On 7 Apr 1998 23:32:09 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
wrote:

snipping all the complete and successful help!

>Setup two ksh function definitions 

[snip]

>In your slrnrc:

[snip]

> set signature Man.from.Utopia.sig.file  % this is a file name

Thanks! I now have a sig! ;)

[snip]

Jan, thanks for the tremendous help -- invaluable and worked like a
charm. I've always loved slrn and it gets better and better all the time.

-- 
Man From Utopia

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