🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by NAGY Andras Fri, 20 Nov 1998 00:00
slrn: 'hostname' should be a variable
#44700
Author: NAGY Andras
Date: Fri, 20 Nov 1998 00:00
9 lines
670 bytes
It would be consistent with username and realname (these are variables
too), and it could be set from hooks (for example on a per server
basis).

I hope you can implement it.

Andras

Re: slrn: 'hostname' should be a variable
#44679
Author: Gerfried Fuchs
Date: Fri, 20 Nov 1998 00:00
21 lines
1251 bytes
On 20 Nov 98 18:24:06 +0100, NAGY Andras <nagya@telnet.hu> wrote:
> It would be consistent with username and realname (these are variables
> too), and it could be set from hooks (for example on a per server
> basis).
> 
> I hope you can implement it.

 Hmmm, I thought that is already implemented??
$ grep hostname .slrnrc
hostname "innocent.com"

 Ah, there is it? Don't see why you can't find it?  It's implemented at least
since version 0.9.5.2 since this was the first version I used ;)

 Alfie
-- 
If you want to know what god thinks of money, just look at the people
he gave it to.
                -- Dorthy Parker

Re: slrn: 'hostname' should be a variable
#44704
Author: NAGY Andras
Date: Fri, 20 Nov 1998 00:00
45 lines
1962 bytes
Gerfried Fuchs <alfie@innocent.com> wrote:
>  Hmmm, I thought that is already implemented??
> $ grep hostname .slrnrc
> hostname "innocent.com"
> 
>  Ah, there is it? Don't see why you can't find it?  It's implemented at least
> since version 0.9.5.2 since this was the first version I used ;)

Actually here 'hostname' is not a variable but a command, as I can
see.  My .slrnrc looks like:

hostname "telnet.hu"
set username "nagya"
set realname "NAGY Andras"

and it works fine.  Changing 'hostname' to 'set hostname' results

Reading startup file /home/nagya/.slrnrc.slrn fatal error:
/home/nagya/.slrnrc: Error encountered processing line 14
set hostname "telnet.hu"

Additionally, it would be nice if I could set the hostname on a per
server basis.  If 'hostname' would be a variable, I could write:

define startup_hook ()
{
    !if (strcmp (server_name(), "ludens.elte.hu")) {
        set_string_variable("hostname", "valerie.inf.elte.hu");
    }
}

This piece of code runs fine with variables like username, realname
etc, but since hostname is not a variable, I get the following error:

loading /home/nagya/.slrn.sl
Using newsrc file .jnewsrc for server ludens.elte.hu.
hostname is not a valid variable name.
S-Lang Error: Intrinsic Error: Error while executing startup_hook


I still hope someone can fix this. :)

Andras

Re: slrn: 'hostname' should be a variable
#44780
Author: Sylvan Butler
Date: Mon, 23 Nov 1998 00:00
44 lines
2330 bytes
In article <slrn75bsqe.9e5.nagya@valerie.inf.elte.hu>, NAGY Andras wrote:
>Actually here 'hostname' is not a variable but a command, as I can
>see.  My .slrnrc looks like:
>
>hostname "telnet.hu"
>set username "nagya"
>set realname "NAGY Andras"
>
>and it works fine.  Changing 'hostname' to 'set hostname' results
>
>Reading startup file /home/nagya/.slrnrc.slrn fatal error:
>/home/nagya/.slrnrc: Error encountered processing line 14
>set hostname "telnet.hu"

Right.  This is close:

diff -ru slrn-0.9.5.3/src/startup.c slrn/src/startup.c
--- slrn-0.9.5.3/src/startup.c  Sun May  3 14:06:24 1998
+++ slrn/src/startup.c     Tue Sep  8 10:19:31 1998
@@ -436,6 +436,7 @@
      {"username", &Slrn_User_Info.username},
      {"replyto", &Slrn_User_Info.replyto},
      {"organization", &Slrn_User_Info.org},
+     {"posting_host", &Slrn_User_Info.posting_host},
      {"followup", &Slrn_User_Info.followup_string},   /* obsolete */
      {"followup_string", &Slrn_User_Info.followup_string},
      {"reply_string", &Slrn_User_Info.reply_string},


I think you would just need to add:
+     {"hostname", &Slrn_User_Info.hostname},
Following the '+' line above.

But posting_host may do what you want...

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1755
 "Don't Tread On Me!"

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