Article View: news.software.readers
Article #39989Re: slrn: Multiple NewsServers again
From: Jan Hlavacek
Date: Tue, 07 Apr 1998 00:00
Date: Tue, 07 Apr 1998 00:00
118 lines
4593 bytes
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/
Technical Details
Message-ID:
<slrn6ildro.7gg.lahvak@math.mps.ohio-state.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-mailReferences:
<slrn6il6jd.d30.TroubleEveryDay@user2.teleport.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn6ildro.7gg.lahvak@math.mps.ohio-state.edu> Subject: Re: slrn: Multiple NewsServers again Date: Tue, 07 Apr 1998 00:00:00 +0000 From: lahvak@math.mps.ohio-state.edu (Jan Hlavacek) References: <slrn6il6jd.d30.TroubleEveryDay@user2.teleport.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: 341865560 Reply-To: lahvak@math.mps.ohio-state.edu Organization: Department of Mathematics, The Ohio State University Newsgroups: news.software.readers