๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Steve Lamb Wed, 16 Feb 2000 00:00
[SLRN] OK, why doesn't this work?
#58169
Author: Steve Lamb
Date: Wed, 16 Feb 2000 00:00
46 lines
2516 bytes
    SLRN just loves to play with my mind.  I accidentally deleted an .sl file
I had for changing my name/signature in different newsgroups.  I recently
recreated it for a single newsgroup and so far SLRN refuses to change the
signature upon entering that group.  OTOH, I also had it enabled on alt.test
and it would change there.  Once changed in alt.test it would change on this
newsgroup.  Very annoying.  Can someone look this over and see WTF I must be
doing wrong?

morpheus@teleute:~ cat .morph.sl
define post_hook ()
{
  variable realname =  "Steve Lamb";
  variable signature_file = ".signature";

  if (is_substr(current_newsgroup(),"alt.gothic")){
    realname = "Grey d'Miyu";
    signature_file = ".signature-goth";
  }
  set_string_variable("realname",realname);   
  set_string_variable("signature",signature_file);   
}

morpheus@teleute:~ slrn --version
Slrn Version: 0.9.6.2 (Feb  9 2000 22:09:01)
S-Lang Library Version: 1.3.9
OS: Linux

slrn compile-time options:
 +PULL_SUPPORT +NNTP_SUPPORT +SPOOL_SUPPORT +INEWS_SUPPORT +SPOILERS
 +MIME +SORT_BY_SCORE +USER_AGENT +TILDE_FEATURE +END_OF_THREAD
 +GROUPLENS -MSGID_CACHE +SLANG +GEN_MSGID +CHARACTER_MAP -UUDEVIEW
 +FAKE_REFS +DECODE +PIPING +PIPING +DECODE +RNLOCK +EMPHASIZED_TEXT
 +VERBATUM_MARKS

Default server object: nntp
Default posting mechanism: nntp
Supported character sets include: isolatin ibm850 NeXT koi8
Default character set: isolatin


-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------

Re: [SLRN] OK, why doesn't this work?
#58153
Author: Steve Lamb
Date: Wed, 16 Feb 2000 00:00
20 lines
1718 bytes
On 16 Feb 2000 20:09:27 GMT, Renaud Colinet <colinet@pervenche10.ensta.fr>
wrote:
>>  if (is_substr(current_newsgroup(),"alt.gothic")){
>        ^^^^^^^^^^^^^
>is_substr returns 0 if the substring match, and a non-zero value in the
>other case. Thus the "if" statement is applied if you're NOT posting to
>alt.gothic.

    OK....  Then why isn't my name "Grey d'Miyu" and my signature my AG one
right since I am not posting in AG?

    Why, then, when I had an "or if...." for alt.test in there it /would/ work
on alt.test and AG after I entered alt.test?

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------

Re: [SLRN] OK, why doesn't this work?
#58156
Author: Renaud Colinet
Date: Wed, 16 Feb 2000 00:00
25 lines
1441 bytes
On Wed, Feb 16 2000 17:18:51 GMT, Steve Lamb wrote:
>
>morpheus@teleute:~ cat .morph.sl
>define post_hook ()
>{
>  variable realname =  "Steve Lamb";
>  variable signature_file = ".signature";
>
>  if (is_substr(current_newsgroup(),"alt.gothic")){
        ^^^^^^^^^^^^^
is_substr returns 0 if the substring match, and a non-zero value in the
other case. Thus the "if" statement is applied if you're NOT posting to
alt.gothic.
Change it to
#v+
 if (0 == is_substr(current_newsgroup(),"alt.gothic")){
#v-
and it should work fine

-- 
Renaud
The From: address is valid but filtered. Please use the Reply-To:
address for direct replies.

Re: [SLRN] OK, why doesn't this work?
#58177
Author: Thore Tams
Date: Thu, 17 Feb 2000 00:00
33 lines
1381 bytes
Steve Lamb <morpheus@despair.rpglink.com> schrieb:
> On 16 Feb 2000 22:36:43 GMT, Thore Tams <t.tams@gmx.de> wrote:

[followup_hook vs post_hook]

>     Ah, that would do it.  Was that something new in 0.9.6.x that wasn't in
> the 0.9.5.x series? 

Both were introduced with 0.9.4.2.

> Is there a way to have something called for both?

Try something like

#v+
define universal_hook() {
    % your changes go here
}

define post_hook() {
    universal_hook();
}

define followup_hook() {
    universal_hook();
}
#v-

HTH,

Thore

Re: [SLRN] OK, why doesn't this work?
#58183
Author: Renaud Colinet
Date: Thu, 17 Feb 2000 00:00
20 lines
1516 bytes
Le Wed, 16 Feb 2000 21:47:17 GMT, Steve Lamb a ๏ฟฝcrit:
>
>    OK....  Then why isn't my name "Grey d'Miyu" and my signature my AG one
>right since I am not posting in AG?
>
>    Why, then, when I had an "or if...." for alt.test in there it /would/ work
>on alt.test and AG after I entered alt.test?
>
As stated in another post, that must be because you do real POSTS to
alt.test, where your post_hook applies, but only followups to alt.gothic
or nsr. Then the post_hook isn't evaluated and your settings remain
unchanged.

HTH
-- 
Renaud
The From: address is valid but filtered. Please use the Reply-To:
address for direct replies.

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