🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
163 messages
163 total messages Page 1 of 4 Started by Troy Piggins Wed, 05 Sep 2007 01:10
Page 1 of 4 • 163 total messages
[slrn] NNTP-Posting-Host whois lookup macro
#205216
Author: Troy Piggins
Date: Wed, 05 Sep 2007 01:10
39 lines
2372 bytes
Hi guys,

Just threw together a quick macro[1] for slrn that extracts the
NNTP-Posting-Host header's IP address or hostname, runs it
through whois, and displays the output all within slrn.

I find sometimes I do whois lookups to distinguish legit vs
imposter posts, and decided I do it enough to make writing a
small macro to make life easier.  It's not bad.

If you try it and can think of any improvements, let me know.

Just save everything between the verbatim marks below to a file.  I
called it nntp-postinghost.sl.  Then add the line:

interpret nntp-postinghost.sl

to your .slrnrc.  The definekey statement binds the macro to
[ESC]-H, but you can change that to whatever you want.

Hope that all makes sense.

[1]
#v+
define whois_postinghost () {

  variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
  () = system ( "whois "+postinghost+" | less");

 }

definekey ( "whois_postinghost", "\eH", "article");
#v-

-- 
Troy Piggins | http://piggo.com/~troy                             
                                            ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205218
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 01:42
50 lines
2628 bytes
Troy Piggins wrote:
> Hi guys,
>
> Just threw together a quick macro[1] for slrn that extracts the
> NNTP-Posting-Host header's IP address or hostname, runs it
> through whois, and displays the output all within slrn.
>
> I find sometimes I do whois lookups to distinguish legit vs
> imposter posts, and decided I do it enough to make writing a
> small macro to make life easier.  It's not bad.
>
> If you try it and can think of any improvements, let me know.
>
> Just save everything between the verbatim marks below to a file.  I
> called it nntp-postinghost.sl.  Then add the line:
>
> interpret nntp-postinghost.sl
>
> to your .slrnrc.  The definekey statement binds the macro to
> [ESC]-H, but you can change that to whatever you want.
>
> Hope that all makes sense.
>
> [1]
> #v+
> define whois_postinghost () {
>
>   variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
>   () = system ( "whois "+postinghost+" | less");
>
>  }
>
> definekey ( "whois_postinghost", "\eH", "article");
> #v-

I ran it on your post and got:

<q>

Unknown AS number or IP network. Please upgrade this program.
lines 1-1/1 (END) 

</q>


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205220
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 01:50
55 lines
2874 bytes
Blinky the Shark wrote:
> Troy Piggins wrote:
>> Hi guys,
>>
>> Just threw together a quick macro[1] for slrn that extracts the
>> NNTP-Posting-Host header's IP address or hostname, runs it
>> through whois, and displays the output all within slrn.
>>
>> I find sometimes I do whois lookups to distinguish legit vs
>> imposter posts, and decided I do it enough to make writing a
>> small macro to make life easier.  It's not bad.
>>
>> If you try it and can think of any improvements, let me know.
>>
>> Just save everything between the verbatim marks below to a file.  I
>> called it nntp-postinghost.sl.  Then add the line:
>>
>> interpret nntp-postinghost.sl
>>
>> to your .slrnrc.  The definekey statement binds the macro to
>> [ESC]-H, but you can change that to whatever you want.
>>
>> Hope that all makes sense.
>>
>> [1]
>> #v+
>> define whois_postinghost () {
>>
>>   variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
>>   () = system ( "whois "+postinghost+" | less");
>>
>>  }
>>
>> definekey ( "whois_postinghost", "\eH", "article");
>> #v-
>
> I ran it on your post and got:
>
><q>
>
> Unknown AS number or IP network. Please upgrade this program.
> lines 1-1/1 (END) 
>
></q>

Then I ran it on some of my own posts and got the slrn help page(s).

Then I ran it on some other people's posts and got the whois.


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205222
Author: Troy Piggins
Date: Wed, 05 Sep 2007 01:54
49 lines
2819 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
> [---=| Quote block shrinked by t-prot: 23 lines snipped |=---]
>> #v+
>> define whois_postinghost () {
>>
>>   variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
>>   () = system ( "whois "+postinghost+" | less");
>>
>>  }
>>
>> definekey ( "whois_postinghost", "\eH", "article");
>> #v-
>
> I ran it on your post and got:
>
> <q>
>
> Unknown AS number or IP network. Please upgrade this program.
> lines 1-1/1 (END) 
>
> </q>

So upgrade the program already ;)

I'm not sure about that message.  It comes from the whois
program, so the macro is indeed working, but maybe the IP
database your whois is reading from isn't up to date.  I don't
know if the program itself needs updating.

I have had that message before, but it works when I try it on
same message.

Try it on some other messages, like you own, and see if it works.

Someone once recommended me to try 'whois -a' - the '-a' argument
supposedly searches all databases.  From memory it didn't help
much, but you may have better results.  Just add the '-a' in the
"system" line of macro and source the macro again or just restart
slrn.

If that works let me know, it may pay to add that to the macro as
a default.

-- 
Troy Piggins | http://piggo.com/~troy                             
                                            ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205221
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 02:01
58 lines
3013 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>> [---=| Quote block shrinked by t-prot: 23 lines snipped |=---]
>>> #v+
>>> define whois_postinghost () {
>>>
>>>   variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
>>>   () = system ( "whois "+postinghost+" | less");
>>>
>>>  }
>>>
>>> definekey ( "whois_postinghost", "\eH", "article");
>>> #v-
>>
>> I ran it on your post and got:
>>
>> <q>
>>
>> Unknown AS number or IP network. Please upgrade this program.
>> lines 1-1/1 (END) 
>>
>> </q>
>
> So upgrade the program already ;)
>
> I'm not sure about that message.  It comes from the whois
> program, so the macro is indeed working, but maybe the IP

I never claimed to be much of a beta tester.  :)

> database your whois is reading from isn't up to date.  I don't
> know if the program itself needs updating.
>
> I have had that message before, but it works when I try it on
> same message.
>
> Try it on some other messages, like you own, and see if it works.

See my other reply.

> Someone once recommended me to try 'whois -a' - the '-a' argument
> supposedly searches all databases.  From memory it didn't help
> much, but you may have better results.  Just add the '-a' in the
> "system" line of macro and source the macro again or just restart
> slrn.
>
> If that works let me know, it may pay to add that to the macro as
> a default.

Okay.


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205224
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 02:06
56 lines
3000 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>> [---=| Quote block shrinked by t-prot: 23 lines snipped |=---]
>>> #v+
>>> define whois_postinghost () {
>>>
>>>   variable postinghost=extract_displayed_article_header("NNTP-Posting-Host");
>>>   () = system ( "whois "+postinghost+" | less");
>>>
>>>  }
>>>
>>> definekey ( "whois_postinghost", "\eH", "article");
>>> #v-
>>
>> I ran it on your post and got:
>>
>> <q>
>>
>> Unknown AS number or IP network. Please upgrade this program.
>> lines 1-1/1 (END) 
>>
>> </q>
>
> So upgrade the program already ;)
>
> I'm not sure about that message.  It comes from the whois
> program, so the macro is indeed working, but maybe the IP
> database your whois is reading from isn't up to date.  I don't
> know if the program itself needs updating.
>
> I have had that message before, but it works when I try it on
> same message.
>
> Try it on some other messages, like you own, and see if it works.
>
> Someone once recommended me to try 'whois -a' - the '-a' argument
> supposedly searches all databases.  From memory it didn't help
> much, but you may have better results.  Just add the '-a' in the
> "system" line of macro and source the macro again or just restart
> slrn.
>
> If that works let me know, it may pay to add that to the macro as
> a default.

With

whois -a 

when I use it with your post now I get slrn help.

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205223
Author: Troy Piggins
Date: Wed, 05 Sep 2007 02:10
34 lines
2354 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Blinky the Shark wrote:
> [---=| Quote block shrinked by t-prot: 33 lines snipped |=---]
>>> #v-
>>
>> I ran it on your post and got:
>>
>><q>
>>
>> Unknown AS number or IP network. Please upgrade this program.
>> lines 1-1/1 (END) 
>>
>></q>
>
> Then I ran it on some of my own posts and got the slrn help page(s).

You sure it's /slrn/ help pages?  I got the 'whois --help'
output.

That would be because your posts don't seem to contain the
NNTP-Posting-Host header.  I should add a check for that.  I
should have done that first time round.

> Then I ran it on some other people's posts and got the whois.

Ok - so it works when the header exists in most cases.

Thanks for the feedback.  Do you think it's worthwhile?

-- 
Troy Piggins | http://piggo.com/~troy                             
                                            ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: [slrn] NNTP-Posting-Host whois lookup macro
#205225
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 03:03
47 lines
2745 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Blinky the Shark wrote:
>> [---=| Quote block shrinked by t-prot: 33 lines snipped |=---]
>>>> #v-
>>>
>>> I ran it on your post and got:
>>>
>>><q>
>>>
>>> Unknown AS number or IP network. Please upgrade this program.
>>> lines 1-1/1 (END) 
>>>
>>></q>
>>
>> Then I ran it on some of my own posts and got the slrn help page(s).
>
> You sure it's /slrn/ help pages?  I got the 'whois --help'
> output.

DUH!  Yeah, it's from whois.  Don't look a damn bit like slrn help.

[embarrassed]

> That would be because your posts don't seem to contain the
> NNTP-Posting-Host header.  I should add a check for that.  I
> should have done that first time round.

Ah!  I think we just had a discussion on that, and some of the regs here
have them and some don't.  I didn't think of that either.

>> Then I ran it on some other people's posts and got the whois.
>
> Ok - so it works when the header exists in most cases.
>
> Thanks for the feedback.  Do you think it's worthwhile?

Not every day, probably, but it's small and fast and it provides
information.  That can't be bad.

Annc when you add the header check...

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Update: [slrn] NNTP-Posting-Host whois lookup macro
#205228
Author: Troy Piggins
Date: Wed, 05 Sep 2007 05:12
94 lines
4200 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
>> * Blinky the Shark is quoted & my replies are inline below :
>>> Blinky the Shark wrote:
>>> [---=| Quote block shrinked by t-prot: 33 lines snipped |=---]
>>>>> #v-
>>>>
>>>> I ran it on your post and got:
>>>>
>>>><q>
>>>>
>>>> Unknown AS number or IP network. Please upgrade this program.
>>>> lines 1-1/1 (END) 
>>>>
>>>></q>
>>>
>>> Then I ran it on some of my own posts and got the slrn help page(s).
>>
>> You sure it's /slrn/ help pages?  I got the 'whois --help'
>> output.
>
> DUH!  Yeah, it's from whois.  Don't look a damn bit like slrn help.
>
> [embarrassed]

:)

Try this one[1] on for size.  It now checks if the header even
exists first so it throws an error message before whois can
chuck-a-wobbly and give its help error message.

>> That would be because your posts don't seem to contain the
>> NNTP-Posting-Host header.  I should add a check for that.  I
>> should have done that first time round.
>
> Ah!  I think we just had a discussion on that, and some of the regs here
> have them and some don't.  I didn't think of that either.

Yeah, you guys using mixmaster, anonymous remailers, etc trying
to hide your privacy ;)  Hackers, all of ya!

Just kidding - it's a server thing.  Some force it.  Some don't.
I know motzarella doesn't have it, but my ISP does.  You can't
win 'em all.

If anyone knows of other headers that may contain useful
IP/hostname information, let me know and I can add it.

>>> Then I ran it on some other people's posts and got the whois.
>>
>> Ok - so it works when the header exists in most cases.
>>
>> Thanks for the feedback.  Do you think it's worthwhile?
>
> Not every day, probably, but it's small and fast and it provides
> information.  That can't be bad.
>
> Annc when you add the header check...

Done.

[1] Watch the wrapping, some of the lines below are longer than
80 chars:

#v+
define whois_postinghost () {

  variable status= is_article_visible ();

  if ( status & 1) {
    variable postinghost= extract_article_header ( "NNTP-Posting-Host");
  
    variable ph_exists= strlen ( postinghost);
  
    if ( ph_exists > 0) {
      () = system ( "whois "+postinghost+" | less");
    } else {
     throw InvalidParmError, "This article doesn't contain a NNTP-Posting-Host header"; 
    }

  } else {
    throw InvalidParmError, "You need to display the article to check";
  }

}

definekey ( "whois_postinghost", "\eH", "article");
#v-

-- 
Troy Piggins | http://piggo.com/~troy                             
                                            ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205227
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 05:49
86 lines
3995 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>>> * Blinky the Shark is quoted & my replies are inline below :
>>>> Blinky the Shark wrote:
>>>> [---=| Quote block shrinked by t-prot: 33 lines snipped |=---]
>>>>>> #v-
>>>>>
>>>>> I ran it on your post and got:
>>>>>
>>>>><q>
>>>>>
>>>>> Unknown AS number or IP network. Please upgrade this program.
>>>>> lines 1-1/1 (END) 
>>>>>
>>>>></q>
>>>>
>>>> Then I ran it on some of my own posts and got the slrn help page(s).
>>>
>>> You sure it's /slrn/ help pages?  I got the 'whois --help'
>>> output.
>>
>> DUH!  Yeah, it's from whois.  Don't look a damn bit like slrn help.
>>
>> [embarrassed]
>
>:)
>
> Try this one[1] on for size.  It now checks if the header even
> exists first so it throws an error message before whois can
> chuck-a-wobbly and give its help error message.

When I run it on my own posts, nothing happens.  Looks like you've got
it this time.  :)

>>> That would be because your posts don't seem to contain the
>>> NNTP-Posting-Host header.  I should add a check for that.  I
>>> should have done that first time round.
>>
>> Ah!  I think we just had a discussion on that, and some of the regs here
>> have them and some don't.  I didn't think of that either.
>
> Yeah, you guys using mixmaster, anonymous remailers, etc trying
> to hide your privacy ;)  Hackers, all of ya!

Hey!  slrn and news.individual.net.  Ya don't get any more whitebread
than that, Buster.  :)

> Just kidding - it's a server thing.  Some force it.  Some don't.
> I know motzarella doesn't have it, but my ISP does.  You can't
> win 'em all.

Righto.

Gold:

> #v+
> define whois_postinghost () {
>
>   variable status= is_article_visible ();
>
>   if ( status & 1) {
>     variable postinghost= extract_article_header ( "NNTP-Posting-Host");
>   
>     variable ph_exists= strlen ( postinghost);
>   
>     if ( ph_exists > 0) {
>       () = system ( "whois "+postinghost+" | less");
>     } else {
>      throw InvalidParmError, "This article doesn't contain a NNTP-Posting-Host header"; 
>     }
>
>   } else {
>     throw InvalidParmError, "You need to display the article to check";
>   }
>
> }
>
> definekey ( "whois_postinghost", "\eH", "article");
> #v-

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205233
Author: FACE
Date: Wed, 05 Sep 2007 10:51
10 lines
1920 bytes
On Wed, 05 Sep 2007 15:12:45 +1000, in news.software.readers Troy Piggins
<usenet-0709@piggo.com>, wrote:

>If anyone knows of other headers that may contain useful
>IP/hostname information, let me know and I can add it.

I believe that X-Trace does, but good luck in reading it.  (If anyone knows
how that line is encrypted, and how to decrypt it, please share.)

FACE
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205234
Author: Troy Piggins
Date: Wed, 05 Sep 2007 11:37
18 lines
2252 bytes
* FACE is quoted & my replies are inline below :
> On Wed, 05 Sep 2007 15:12:45 +1000, in news.software.readers Troy Piggins
> <usenet-0709@piggo.com>, wrote:
>
>>If anyone knows of other headers that may contain useful
>>IP/hostname information, let me know and I can add it.
>
> I believe that X-Trace does, but good luck in reading it.  (If anyone knows
> how that line is encrypted, and how to decrypt it, please share.)

Thanks for that.  I had a quick browse for it, but it seems to be
newsreader specific, so doubt it can be easily added to my macro.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205235
Author: Patrick Lamaizière
Date: Wed, 05 Sep 2007 11:43
14 lines
2079 bytes
Troy Piggins wrote:

>> I believe that X-Trace does, but good luck in reading it.  (If anyone
>> knows how that line is encrypted, and how to decrypt it, please share.)
> 
> Thanks for that.  I had a quick browse for it, but it seems to be
> newsreader specific,

News server specific.

> so doubt it can be easily added to my macro. 

Yes. 
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205238
Author: Peter J Ross
Date: Wed, 05 Sep 2007 15:48
48 lines
3007 bytes
In news.software.readers on Wed, 05 Sep 2007 21:37:37 +1000, Troy
Piggins <usenet-0709@piggo.com> wrote:

> * FACE is quoted & my replies are inline below :
>> On Wed, 05 Sep 2007 15:12:45 +1000, in news.software.readers Troy Piggins
>> <usenet-0709@piggo.com>, wrote:
>>
>>>If anyone knows of other headers that may contain useful
>>>IP/hostname information, let me know and I can add it.
>>
>> I believe that X-Trace does, but good luck in reading it.  (If anyone knows
>> how that line is encrypted, and how to decrypt it, please share.)
>
> Thanks for that.  I had a quick browse for it, but it seems to be
> newsreader specific, so doubt it can be easily added to my macro.

X-Trace is (or at least should be) added by the server, not the
newsreader. It *may* contain an unencrypted IP address. 

Another header that may contain an IP address is Injection-Info.

In both cases you'd have to extract anything that seemed to be an IP
address from the header.

S-Lang regex:
	\<\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\>

PCRE regex:
	\b(\d{1,3}\.){3}\d{1,3}\b

POSIX.2 regex (for "grep -e" etc.):
	\b\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\b
(This is the only one I've tested.)

LISP regex:
	probably a mixture of the above with about twenty extra
	backslashes ;-)

In fact, you could parse all headers for IP addresses, but you'd have
to exclude at least Path: and Message-ID, which may contain IP
addresses that identify a news server, not a poster.

Anyway, your macro looks useful enough already, without a huge amount
of elaboration being needed. Thanks.


-- 
PJR :-)
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205241
Author: Peter J Ross
Date: Wed, 05 Sep 2007 16:09
47 lines
2741 bytes
In news.software.readers on Wed, 05 Sep 2007 15:12:45 +1000, Troy
Piggins <usenet-0709@piggo.com> wrote:

#v+
> define whois_postinghost () {
>
>   variable status= is_article_visible ();
>
>   if ( status & 1) {
>     variable postinghost= extract_article_header ( "NNTP-Posting-Host");
>   
>     variable ph_exists= strlen ( postinghost);
>   
>     if ( ph_exists > 0) {
>       () = system ( "whois "+postinghost+" | less");
>     } else {
>      throw InvalidParmError, "This article doesn't contain a NNTP-Posting-Host header"; 
>     }
>
>   } else {
>     throw InvalidParmError, "You need to display the article to check";
>   }
>
> }
>
> definekey ( "whois_postinghost", "\eH", "article");
#v-

Very nice.

To be bulletproof on all the OSes slrn can run on, you probably need
to check for the existence of a program named "whois" (not AFAIK
available by default on Windows, at least up to Win2k, or on a minimal
Debian installation). The same applies to "less", with the added
complexity that some people may use "more", "most" or even "vi" as
their pager.

Or just add a comment explaining that
		() = system ( "whois "+postinghost+" | less");
may need to be edited.

Have you considered making your useful collection of macros available
as a .deb and/or .rpm? If you did, you could specify suggested
dependencies, such as, in this case, a whois client and a pager.

-- 
PJR :-)
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205251
Author: Troy Piggins
Date: Wed, 05 Sep 2007 21:12
64 lines
3719 bytes
* Peter J Ross is quoted & my replies are inline below :
> In news.software.readers on Wed, 05 Sep 2007 21:37:37 +1000, Troy
> Piggins <usenet-0709@piggo.com> wrote:
>
>> * FACE is quoted & my replies are inline below :
>>> On Wed, 05 Sep 2007 15:12:45 +1000, in news.software.readers Troy Piggins
>>> <usenet-0709@piggo.com>, wrote:
>>>
>>>>If anyone knows of other headers that may contain useful
>>>>IP/hostname information, let me know and I can add it.
>>>
>>> I believe that X-Trace does, but good luck in reading it.  (If anyone knows
>>> how that line is encrypted, and how to decrypt it, please share.)
>>
>> Thanks for that.  I had a quick browse for it, but it seems to be
>> newsreader specific, so doubt it can be easily added to my macro.
>
> X-Trace is (or at least should be) added by the server, not the
> newsreader. It *may* contain an unencrypted IP address. 

Thanks for the clarification.

> Another header that may contain an IP address is Injection-Info.

I'll look into adding it.  Thanks.

> In both cases you'd have to extract anything that seemed to be an IP
> address from the header.
>
> S-Lang regex:
> 	\<\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\>

That'd be the one I need to look for, I think.

> PCRE regex:
> 	\b(\d{1,3}\.){3}\d{1,3}\b
>
> POSIX.2 regex (for "grep -e" etc.):
> 	\b\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\b
> (This is the only one I've tested.)
>
> LISP regex:
> 	probably a mixture of the above with about twenty extra
> 	backslashes ;-)

LOL.

> In fact, you could parse all headers for IP addresses, but you'd have
> to exclude at least Path: and Message-ID, which may contain IP
> addresses that identify a news server, not a poster.

I don't think I want to go that far.

> Anyway, your macro looks useful enough already, without a huge amount
> of elaboration being needed. Thanks.

No worries.  I figure if I find something useful, others are sure
to.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205254
Author: Troy Piggins
Date: Wed, 05 Sep 2007 21:17
61 lines
3871 bytes
* Peter J Ross is quoted & my replies are inline below :
> In news.software.readers on Wed, 05 Sep 2007 15:12:45 +1000, Troy
> Piggins <usenet-0709@piggo.com> wrote:
>
> #v+
> > define whois_postinghost () {
> >
> >   variable status= is_article_visible ();
> >
> >   if ( status & 1) {
> >     variable postinghost= extract_article_header ( "NNTP-Posting-Host");
> >   
> >     variable ph_exists= strlen ( postinghost);
> >   
> >     if ( ph_exists > 0) {
> >       () = system ( "whois "+postinghost+" | less");
> >     } else {
> >      throw InvalidParmError, "This article doesn't contain a NNTP-Posting-Host header"; 
> >     }
> >
> >   } else {
> >     throw InvalidParmError, "You need to display the article to check";
> >   }
> >
> > }
> >
> > definekey ( "whois_postinghost", "\eH", "article");
> #v-
>
> Very nice.
>
> To be bulletproof on all the OSes slrn can run on, you probably need
> to check for the existence of a program named "whois" (not AFAIK
> available by default on Windows, at least up to Win2k, or on a minimal
> Debian installation). The same applies to "less", with the added
> complexity that some people may use "more", "most" or even "vi" as
> their pager.

Good point.  I thought about that myself, just need a little more
(no pun intended) time.

> Or just add a comment explaining that
> 		() = system ( "whois "+postinghost+" | less");
> may need to be edited.

That's a good interim solution.

> Have you considered making your useful collection of macros available
> as a .deb and/or .rpm? If you did, you could specify suggested
> dependencies, such as, in this case, a whois client and a pager.

I have considered it, but to be honest I have trouble publishing
the macros as they are, let alone rolling packages.  I haven't
done that much .deb creation so maybe it's not as painful as I
think.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205256
Author: Blinky the Shark
Date: Wed, 05 Sep 2007 23:07
64 lines
4078 bytes
Troy Piggins wrote:
> * Peter J Ross is quoted & my replies are inline below :
>> In news.software.readers on Wed, 05 Sep 2007 15:12:45 +1000, Troy
>> Piggins <usenet-0709@piggo.com> wrote:
>>
>> #v+
>> > define whois_postinghost () {
>> >
>> >   variable status= is_article_visible ();
>> >
>> >   if ( status & 1) { variable postinghost= extract_article_header (
>> >   "NNTP-Posting-Host");
>> >   
>> >     variable ph_exists= strlen ( postinghost);
>> >   
>> >     if ( ph_exists > 0) { () = system ( "whois "+postinghost+" |
>> >     less"); } else { throw InvalidParmError, "This article doesn't
>> >     contain a NNTP-Posting-Host header"; }
>> >
>> >   } else { throw InvalidParmError, "You need to display the article
>> >   to check"; }
>> >
>> > }
>> >
>> > definekey ( "whois_postinghost", "\eH", "article");
>> #v-
>>
>> Very nice.
>>
>> To be bulletproof on all the OSes slrn can run on, you probably need
>> to check for the existence of a program named "whois" (not AFAIK
>> available by default on Windows, at least up to Win2k, or on a
>> minimal Debian installation). The same applies to "less", with the
>> added complexity that some people may use "more", "most" or even "vi"
>> as their pager.
>
> Good point.  I thought about that myself, just need a little more (no
> pun intended) time.
>
>> Or just add a comment explaining that () = system ( "whois
>> "+postinghost+" | less"); may need to be edited.
>
> That's a good interim solution.
>
>> Have you considered making your useful collection of macros available
>> as a .deb and/or .rpm? If you did, you could specify suggested
>> dependencies, such as, in this case, a whois client and a pager.
>
> I have considered it, but to be honest I have trouble publishing the
> macros as they are, let alone rolling packages.  I haven't done that
> much .deb creation so maybe it's not as painful as I think.

Weirdest thing.  Right now, I have to comment out the interpret line for
this macro in .slrnrc or slrn won't run.  And I can't remember how to
run slrn so that the error messages are retained; the failure goes by so
fast that I can't read it.  I'm not claiming it's the macro; I just
don't know what's happening.  I've made a fresh paste of your last
version into whois_postinghost.sl more than once, to no avail.

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205257
Author: SINNER
Date: Thu, 06 Sep 2007 00:00
18 lines
2127 bytes
* Blinky the Shark wrote in news.software.readers:

[...]

> Weirdest thing.  Right now, I have to comment out the interpret line for
> this macro in .slrnrc or slrn won't run.  And I can't remember how to
> run slrn so that the error messages are retained;

[...]

slrn -w

-- 
David
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Signs of crime: screaming or cries for help.
		-- The Brown University Security Crime Prevention Pamphlet
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205258
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 00:07
22 lines
2198 bytes
SINNER wrote:
> * Blinky the Shark wrote in news.software.readers:
>
> [...]
>
>> Weirdest thing.  Right now, I have to comment out the interpret line for
>> this macro in .slrnrc or slrn won't run.  And I can't remember how to
>> run slrn so that the error messages are retained;
>
> [...]
>
> slrn -w

<engages the stickytags.sl macro to star this post to come back to after
testing>


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205259
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 00:17
44 lines
2917 bytes
SINNER wrote:
> * Blinky the Shark wrote in news.software.readers:
>
> [...]
>
>> Weirdest thing.  Right now, I have to comment out the interpret line
>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>> how to run slrn so that the error messages are retained;
>
> [...]
>
> slrn -w

Didn't make any difference.  Neigher did -w0

What did make a difference was running slrn straight up

slrn

as your example showed, rather than from the bash script that I normally
run it from.  :)

slrn fatal error:
/home/blinky/.slrnrc: Error encountered processing line 582
interpret "whois_postinghost.sl"

Still weird.  whois_postinghost.sl is in the same directory as the other
macros (which slrn doesn't barf about) and has the same permissions.

And, as I mentioned, I've pasted Troy's code in more than once, to make
sure I had the right stuff in the file.

[blinky@thurston macros]$ pwd
/usr/local/share/slrn/macros
[blinky@thurston macros]$ ll whois_postinghost.sl
-rw-r--r--  1 root root 555 Sep  5 15:56 whois_postinghost.sl

Same as all the others.

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205260
Author: SINNER
Date: Thu, 06 Sep 2007 00:30
52 lines
3152 bytes
* Blinky the Shark wrote in news.software.readers:
> SINNER wrote:
>> * Blinky the Shark wrote in news.software.readers:

>> [...]

>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>> how to run slrn so that the error messages are retained;

>> [...]

>> slrn -w

> Didn't make any difference.  Neigher did -w0

> What did make a difference was running slrn straight up

> slrn

> as your example showed, rather than from the bash script that I normally
> run it from.  :)

> slrn fatal error:
> /home/blinky/.slrnrc: Error encountered processing line 582
> interpret "whois_postinghost.sl"

Line 582!!!

I dont think the file is THAT big, is it?

> Still weird.  whois_postinghost.sl is in the same directory as the other
> macros (which slrn doesn't barf about) and has the same permissions.

> And, as I mentioned, I've pasted Troy's code in more than once, to make
> sure I had the right stuff in the file.

> [blinky@thurston macros]$ pwd
> /usr/local/share/slrn/macros
> [blinky@thurston macros]$ ll whois_postinghost.sl
> -rw-r--r--  1 root root 555 Sep  5 15:56 whois_postinghost.sl

How about

wc -l whois_postinghost.sl

-- 
David
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Q:	Who cuts the grass on Walton's Mountain?
A:	Lawn Boy.
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205264
Author: SINNER
Date: Thu, 06 Sep 2007 01:20
40 lines
2852 bytes
* SINNER wrote in news.software.readers:
> * Blinky the Shark wrote in news.software.readers:
>> SINNER wrote:
>>> * Blinky the Shark wrote in news.software.readers:

>>> [...]

>>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>>> how to run slrn so that the error messages are retained;

>>> [...]

>>> slrn -w

>> Didn't make any difference.  Neigher did -w0

>> What did make a difference was running slrn straight up

>> slrn

>> as your example showed, rather than from the bash script that I normally
>> run it from.  :)

>> slrn fatal error:
>> /home/blinky/.slrnrc: Error encountered processing line 582
>> interpret "whois_postinghost.sl"

> Line 582!!!

> I dont think the file is THAT big, is it?

DOH! Nevermind, thats the slrnrc line count.

What about removing the quotes?
-- 
David
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html

Here comes the orator, with his flood of words and his drop of reason.
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205266
Author: Troy Piggins
Date: Thu, 06 Sep 2007 02:48
44 lines
2985 bytes
* SINNER is quoted & my replies are inline below :
> * SINNER wrote in news.software.readers:
>> * Blinky the Shark wrote in news.software.readers:
>>> SINNER wrote:
>>>> * Blinky the Shark wrote in news.software.readers:
>
>>>> [...]
>
>>>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>>>> how to run slrn so that the error messages are retained;
>
>>>> [...]
>
>>>> slrn -w
>
>>> Didn't make any difference.  Neigher did -w0
>
>>> What did make a difference was running slrn straight up
>
>>> slrn
>
>>> as your example showed, rather than from the bash script that I normally
>>> run it from.  :)
>
>>> slrn fatal error:
>>> /home/blinky/.slrnrc: Error encountered processing line 582
>>> interpret "whois_postinghost.sl"
>
>> Line 582!!!
>
>> I dont think the file is THAT big, is it?
>
> DOH! Nevermind, thats the slrnrc line count.
>
> What about removing the quotes?

That shouldn't affect it - mine all have quotes.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205267
Author: Troy Piggins
Date: Thu, 06 Sep 2007 02:50
51 lines
3213 bytes
* Blinky the Shark is quoted & my replies are inline below :
> SINNER wrote:
>> * Blinky the Shark wrote in news.software.readers:
>>
>> [...]
>>
>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>> how to run slrn so that the error messages are retained;
>>
>> [...]
>>
>> slrn -w
>
> Didn't make any difference.  Neigher did -w0
>
> What did make a difference was running slrn straight up
>
> slrn
>
> as your example showed, rather than from the bash script that I normally
> run it from.  :)
>
> slrn fatal error:
> /home/blinky/.slrnrc: Error encountered processing line 582
> interpret "whois_postinghost.sl"
>
> Still weird.  whois_postinghost.sl is in the same directory as the other
> macros (which slrn doesn't barf about) and has the same permissions.
>
> And, as I mentioned, I've pasted Troy's code in more than once, to make
> sure I had the right stuff in the file.

Silly question - you didn't copy and paste the verbatim marks,
did you?

And there's a long line in the over 80chars - no wrapping issues?

> [blinky@thurston macros]$ pwd
> /usr/local/share/slrn/macros
> [blinky@thurston macros]$ ll whois_postinghost.sl
> -rw-r--r--  1 root root 555 Sep  5 15:56 whois_postinghost.sl
>
> Same as all the others.


-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205268
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 04:09
44 lines
2962 bytes
SINNER wrote:
> * SINNER wrote in news.software.readers:
>> * Blinky the Shark wrote in news.software.readers:
>>> SINNER wrote:
>>>> * Blinky the Shark wrote in news.software.readers:
>
>>>> [...]
>
>>>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>>>> how to run slrn so that the error messages are retained;
>
>>>> [...]
>
>>>> slrn -w
>
>>> Didn't make any difference.  Neigher did -w0
>
>>> What did make a difference was running slrn straight up
>
>>> slrn
>
>>> as your example showed, rather than from the bash script that I normally
>>> run it from.  :)
>
>>> slrn fatal error:
>>> /home/blinky/.slrnrc: Error encountered processing line 582
>>> interpret "whois_postinghost.sl"
>
>> Line 582!!!
>
>> I dont think the file is THAT big, is it?
>
> DOH! Nevermind, thats the slrnrc line count.
>
> What about removing the quotes?

All the other interpret commands use them.

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205269
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 04:21
49 lines
3160 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> SINNER wrote:
>>> * Blinky the Shark wrote in news.software.readers:
>>>
>>> [...]
>>>
>>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>>> how to run slrn so that the error messages are retained;
>>>
>>> [...]
>>>
>>> slrn -w
>>
>> Didn't make any difference.  Neigher did -w0
>>
>> What did make a difference was running slrn straight up
>>
>> slrn
>>
>> as your example showed, rather than from the bash script that I normally
>> run it from.  :)
>>
>> slrn fatal error:
>> /home/blinky/.slrnrc: Error encountered processing line 582
>> interpret "whois_postinghost.sl"
>>
>> Still weird.  whois_postinghost.sl is in the same directory as the other
>> macros (which slrn doesn't barf about) and has the same permissions.
>>
>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>> sure I had the right stuff in the file.
>
> Silly question - you didn't copy and paste the verbatim marks,
> did you?

No.

> And there's a long line in the over 80chars - no wrapping issues?

http://blinkynet.net/stuff/comp/whois_macro.jpg


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205270
Author: Troy Piggins
Date: Thu, 06 Sep 2007 04:27
37 lines
3086 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
> [---=| Quote block shrinked by t-prot: 25 lines snipped |=---]
>>> interpret "whois_postinghost.sl"
>>>
>>> Still weird.  whois_postinghost.sl is in the same directory as the other
>>> macros (which slrn doesn't barf about) and has the same permissions.
>>>
>>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>>> sure I had the right stuff in the file.
>>
>> Silly question - you didn't copy and paste the verbatim marks,
>> did you?
>
> No.
>
>> And there's a long line in the over 80chars - no wrapping issues?
>
> http://blinkynet.net/stuff/comp/whois_macro.jpg

Yep - that looks right.

All I can suggest is that perhaps there is something funny going
on elsewhere in the .slrnrc file - like maybe an inverted commas
got deleted or something while adding the new interpret line -
and it's not getting the error until the next command.  Maybe?

Did you say commenting out that line makes it work again?

If you look at my slrn page I've added this macro there, but
calling it now whois.sl.  Try downloading that one?

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205272
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 05:49
45 lines
3337 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>> [---=| Quote block shrinked by t-prot: 25 lines snipped |=---]
>>>> interpret "whois_postinghost.sl"
>>>>
>>>> Still weird.  whois_postinghost.sl is in the same directory as the other
>>>> macros (which slrn doesn't barf about) and has the same permissions.
>>>>
>>>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>>>> sure I had the right stuff in the file.
>>>
>>> Silly question - you didn't copy and paste the verbatim marks,
>>> did you?
>>
>> No.
>>
>>> And there's a long line in the over 80chars - no wrapping issues?
>>
>> http://blinkynet.net/stuff/comp/whois_macro.jpg
>
> Yep - that looks right.
>
> All I can suggest is that perhaps there is something funny going
> on elsewhere in the .slrnrc file - like maybe an inverted commas
> got deleted or something while adding the new interpret line -
> and it's not getting the error until the next command.  Maybe?

http://blinkynet.net/stuff/comp/whois_macro_slrnrc.jpg

> Did you say commenting out that line makes it work again?

Yep.

> If you look at my slrn page I've added this macro there, but
> calling it now whois.sl.  Try downloading that one?

How does it differ from the one you posted here (which worked okay until
today here)?

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205273
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 06:02
44 lines
3272 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>> [---=| Quote block shrinked by t-prot: 25 lines snipped |=---]
>>>> interpret "whois_postinghost.sl"
>>>>
>>>> Still weird.  whois_postinghost.sl is in the same directory as the other
>>>> macros (which slrn doesn't barf about) and has the same permissions.
>>>>
>>>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>>>> sure I had the right stuff in the file.
>>>
>>> Silly question - you didn't copy and paste the verbatim marks,
>>> did you?
>>
>> No.
>>
>>> And there's a long line in the over 80chars - no wrapping issues?
>>
>> http://blinkynet.net/stuff/comp/whois_macro.jpg
>
> Yep - that looks right.
>
> All I can suggest is that perhaps there is something funny going
> on elsewhere in the .slrnrc file - like maybe an inverted commas
> got deleted or something while adding the new interpret line -
> and it's not getting the error until the next command.  Maybe?
>
> Did you say commenting out that line makes it work again?
>
> If you look at my slrn page I've added this macro there, but
> calling it now whois.sl.  Try downloading that one?

slrn still won't run.  Here's my new macro file made from your website
copy:

http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205274
Author: Troy Piggins
Date: Thu, 06 Sep 2007 06:05
52 lines
3693 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
>> * Blinky the Shark is quoted & my replies are inline below :
>>> Troy Piggins wrote:
>>> [---=| Quote block shrinked by t-prot: 25 lines snipped |=---]
>>>>> interpret "whois_postinghost.sl"
>>>>>
>>>>> Still weird.  whois_postinghost.sl is in the same directory as the other
>>>>> macros (which slrn doesn't barf about) and has the same permissions.
>>>>>
>>>>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>>>>> sure I had the right stuff in the file.
>>>>
>>>> Silly question - you didn't copy and paste the verbatim marks,
>>>> did you?
>>>
>>> No.
>>>
>>>> And there's a long line in the over 80chars - no wrapping issues?
>>>
>>> http://blinkynet.net/stuff/comp/whois_macro.jpg
>>
>> Yep - that looks right.
>>
>> All I can suggest is that perhaps there is something funny going
>> on elsewhere in the .slrnrc file - like maybe an inverted commas
>> got deleted or something while adding the new interpret line -
>> and it's not getting the error until the next command.  Maybe?
>
> http://blinkynet.net/stuff/comp/whois_macro_slrnrc.jpg
>
>> Did you say commenting out that line makes it work again?
>
> Yep.

Well that sucks.  I'll look at it closer when I get home.

>> If you look at my slrn page I've added this macro there, but
>> calling it now whois.sl.  Try downloading that one?
>
> How does it differ from the one you posted here (which worked okay until
> today here)?

It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
was a big day - proposed to my girlfriend.  Apparently she said
"Yes" :)

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205276
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 06:23
16 lines
2301 bytes
Troy Piggins wrote:

> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
> was a big day - proposed to my girlfriend.  Apparently she said
> "Yes" :)

Been secretly working on kill_bachelorhood.sl, eh?  ;)

Congratulations!


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205277
Author: Troy Piggins
Date: Thu, 06 Sep 2007 06:27
56 lines
3445 bytes
* Blinky the Shark is quoted & my replies are inline below :
> SINNER wrote:
>> * Blinky the Shark wrote in news.software.readers:
>>
>> [...]
>>
>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>> how to run slrn so that the error messages are retained;
>>
>> [...]
>>
>> slrn -w
>
> Didn't make any difference.  Neigher did -w0
>
> What did make a difference was running slrn straight up
>
> slrn
>
> as your example showed, rather than from the bash script that I normally
> run it from.  :)
>
> slrn fatal error:
> /home/blinky/.slrnrc: Error encountered processing line 582
> interpret "whois_postinghost.sl"

Just having another look at this - I know you said it the same as
all the other macros, but just to be sure can you try it with the
full path to the macro?

> Still weird.  whois_postinghost.sl is in the same directory as the other
> macros (which slrn doesn't barf about) and has the same permissions.

Do you have macro_directory set in .slrnrc?  If not, it should
default to /usr/local/share/slrn/macros then $HOME.  I see that's
where you have it so that should be right.  Just thinking out
loud.

> And, as I mentioned, I've pasted Troy's code in more than once, to make
> sure I had the right stuff in the file.
>
> [blinky@thurston macros]$ pwd
> /usr/local/share/slrn/macros
> [blinky@thurston macros]$ ll whois_postinghost.sl
> -rw-r--r--  1 root root 555 Sep  5 15:56 whois_postinghost.sl
>
> Same as all the others.

I'm stumped.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205278
Author: andrew
Date: Thu, 06 Sep 2007 06:30
15 lines
2207 bytes
On 2007-09-06, Troy Piggins <usenet-0709@piggo.com> wrote:

[...]

> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
> was a big day - proposed to my girlfriend.  Apparently she said
> "Yes" :)

Congraulations to you both!!

       Andrew

-- 
Andrew's Corner
http://people.aapt.net.au/~adjlstrong/ubuntu_cli.html
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205279
Author: Troy Piggins
Date: Thu, 06 Sep 2007 06:31
21 lines
2646 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
>
>> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
>> was a big day - proposed to my girlfriend.  Apparently she said
>> "Yes" :)
>
> Been secretly working on kill_bachelorhood.sl, eh?  ;)
>
> Congratulations!

LOL thanks!  I'll have to send a group email to all the
chicky-babes to let them know I'm off the market :)  There will
be electrical smoke all over the place from their tears falling
on their keyboards and shorting them out...

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205281
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 06:37
24 lines
2785 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:
>>
>>> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
>>> was a big day - proposed to my girlfriend.  Apparently she said
>>> "Yes" :)
>>
>> Been secretly working on kill_bachelorhood.sl, eh?  ;)
>>
>> Congratulations!
>
> LOL thanks!  I'll have to send a group email to all the
> chicky-babes to let them know I'm off the market :)  There will
> be electrical smoke all over the place from their tears falling
> on their keyboards and shorting them out...

Can you still see your monitor past that big head of yours?  ;)

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205282
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 06:43
70 lines
4167 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> SINNER wrote:
>>> * Blinky the Shark wrote in news.software.readers:
>>>
>>> [...]
>>>
>>>> Weirdest thing.  Right now, I have to comment out the interpret line
>>>> for this macro in .slrnrc or slrn won't run.  And I can't remember
>>>> how to run slrn so that the error messages are retained;
>>>
>>> [...]
>>>
>>> slrn -w
>>
>> Didn't make any difference.  Neigher did -w0
>>
>> What did make a difference was running slrn straight up
>>
>> slrn
>>
>> as your example showed, rather than from the bash script that I normally
>> run it from.  :)
>>
>> slrn fatal error:
>> /home/blinky/.slrnrc: Error encountered processing line 582
>> interpret "whois_postinghost.sl"
>
> Just having another look at this - I know you said it the same as
> all the other macros, but just to be sure can you try it with the
> full path to the macro?
>
>> Still weird.  whois_postinghost.sl is in the same directory as the other
>> macros (which slrn doesn't barf about) and has the same permissions.
>
> Do you have macro_directory set in .slrnrc?  If not, it should

I have it set -- to the default, just so when I forget what that default
is I can look in .slrnrc and see it. :)  All of the other macros in the
list of macros interpret commands in .slrnrc find it fine.  As did
yours, yesterday, if you recall.  Remember working with me on the first
version, before you added the header-presence check?  The macro directory
and the interpret command haven't changed since then.

> default to /usr/local/share/slrn/macros then $HOME.  I see that's
> where you have it so that should be right.  Just thinking out
> loud.

No problem.  Similarly, I've been responding out loud.  :)

>> And, as I mentioned, I've pasted Troy's code in more than once, to make
>> sure I had the right stuff in the file.
>>
>> [blinky@thurston macros]$ pwd
>> /usr/local/share/slrn/macros
>> [blinky@thurston macros]$ ll whois_postinghost.sl
>> -rw-r--r--  1 root root 555 Sep  5 15:56 whois_postinghost.sl
>>
>> Same as all the others.
>
> I'm stumped.

And remember -- getting married is going to take off part of your
finely-honed edge.  Unless you're marrying a geekess.  ;)

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205284
Author: John E. Davis
Date: Thu, 06 Sep 2007 06:58
16 lines
1967 bytes
On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
wrote:
>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg

What version of slang are you using?  If you are using version 1, 
you will need to replace lines such as

   throw InvalidParmError, "foo";
   
with

   error ("foo");

try/catch/throw/finally semantics were not added until version 2.

--John
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205285
Author: andrew
Date: Thu, 06 Sep 2007 07:06
25 lines
2406 bytes
On 2007-09-06, John E. Davis <davis@space.mit.edu> wrote:
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
> wrote:
>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>
> What version of slang are you using?  If you are using version 1, 
> you will need to replace lines such as
>
>    throw InvalidParmError, "foo";
>    
> with
>
>    error ("foo");
>
> try/catch/throw/finally semantics were not added until version 2.
>
> --John

Any other celebrities lurking here?

     Andrew

-- 
Andrew's Corner
http://people.aapt.net.au/~adjlstrong/ubuntu_cli.html
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205286
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:07
20 lines
2607 bytes
* andrew is quoted & my replies are inline below :
> On 2007-09-06, Troy Piggins <usenet-0709@piggo.com> wrote:
>
> [...]
>
>> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
>> was a big day - proposed to my girlfriend.  Apparently she said
>> "Yes" :)
>
> Congraulations to you both!!
>
>        Andrew

:)  Thanks mate!

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205287
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:09
27 lines
3047 bytes
* Blinky the Shark is quoted & my replies are inline below :
> Troy Piggins wrote:
>> * Blinky the Shark is quoted & my replies are inline below :
>>> Troy Piggins wrote:
>>>
>>>> It doesn't.  Different filename?  I dunno.  I'm tired.  Yesterday
>>>> was a big day - proposed to my girlfriend.  Apparently she said
>>>> "Yes" :)
>>>
>>> Been secretly working on kill_bachelorhood.sl, eh?  ;)
>>>
>>> Congratulations!
>>
>> LOL thanks!  I'll have to send a group email to all the
>> chicky-babes to let them know I'm off the market :)  There will
>> be electrical smoke all over the place from their tears falling
>> on their keyboards and shorting them out...
>
> Can you still see your monitor past that big head of yours?  ;)

LOL.  I'm on a bit of a high right now.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205288
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:12
26 lines
2874 bytes
* John E. Davis is quoted & my replies are inline below :
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid> wrote:
>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>
> What version of slang are you using?  If you are using version 1, 
> you will need to replace lines such as
>
>    throw InvalidParmError, "foo";
>    
> with
>
>    error ("foo");
>
> try/catch/throw/finally semantics were not added until version 2.

Thanks John.  I'm using version 2, not sure what Blinky is using.

Perhaps I should just use error ("foo"); for compatibility.

PS - you are a legend.  Just wanted you to know that.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205289
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:16
15 lines
2436 bytes
* Blinky the Shark is quoted & my replies are inline below :
[snip]
>
> And remember -- getting married is going to take off part of your
> finely-honed edge.  Unless you're marrying a geekess.  ;)

Far from it - apparently, up until yesterday when I proposed, she
thought I loved my computers more than her.  Preposterous.  I
only love one of my computers and now it's jealous  ;)

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205290
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 07:21
35 lines
2826 bytes
John E. Davis wrote:
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
> wrote:
>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>
> What version of slang are you using?  If you are using version 1, 

Apparently this one:

/usr/lib/libslang.so.1.4.9

> you will need to replace lines such as

I didn't have to edit his macro yesterday, when it worked fine.

I await a comment from Troy on whether he switched slang version code in
the middle of this.  Because if he did, I may have to chew off one of
his legs next time he goes swimming in the ocean.

>    throw InvalidParmError, "foo";
>    
> with
>
>    error ("foo");
>
> try/catch/throw/finally semantics were not added until version 2.

I'll try this.  BRB.


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205291
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:24
48 lines
3333 bytes
* John E. Davis is quoted & my replies are inline below :
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid> wrote:
>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>
> What version of slang are you using?  If you are using version 1, 
> you will need to replace lines such as
>
>    throw InvalidParmError, "foo";
>    
> with
>
>    error ("foo");
>
> try/catch/throw/finally semantics were not added until version 2.

#v+
% You need 'whois' and 'less' for this macro to work.  Future version will
% hopefully check they exist already or possibly provide alternatives.

define whois_postinghost () {

  variable status= is_article_visible ();

  if ( status & 1) {
    variable postinghost= extract_article_header ( "NNTP-Posting-Host");
  
    variable ph_exists= strlen ( postinghost);
  
    if ( ph_exists > 0) {
      () = system ( "whois "+postinghost+" | less");
    } else {
      error ("This article doesn't contain a NNTP-Posting-Host header");
    }

  } else {
     error ("You need to display the article to check");
  }

}

definekey ( "whois_postinghost", "\eH", "article");
#v-

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205292
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:28
46 lines
3269 bytes
* Blinky the Shark is quoted & my replies are inline below :
> John E. Davis wrote:
>> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
>> wrote:
>>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>>
>> What version of slang are you using?  If you are using version 1, 
>
> Apparently this one:
>
> /usr/lib/libslang.so.1.4.9
>
>> you will need to replace lines such as
>
> I didn't have to edit his macro yesterday, when it worked fine.
>
> I await a comment from Troy on whether he switched slang version code in
> the middle of this.  Because if he did, I may have to chew off one of
> his legs next time he goes swimming in the ocean.

EEEEEEKKKK.  

The only code I changed was adding the "throw" lines
and "if" conditions.  I just posted a version that should be
compatible with both slang versions, and the one on my website is
updated too.

Please don't eat my leg, I don't want to be hopping at the alter.

>>    throw InvalidParmError, "foo";
>>    
>> with
>>
>>    error ("foo");
>>
>> try/catch/throw/finally semantics were not added until version 2.
>
> I'll try this.  BRB.

Beat ya.  :-P

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205293
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 07:37
65 lines
3578 bytes
John E. Davis wrote:
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
> wrote:
>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>
> What version of slang are you using?  If you are using version 1, 
> you will need to replace lines such as
>
>    throw InvalidParmError, "foo";
>    
> with
>
>    error ("foo");
>
> try/catch/throw/finally semantics were not added until version 2.

Bingo!  That got it, John.

I sure can't figure out why I reported it working yesterday, after he
added his header checks.  <scratches head>  And I could've sworn I used
it on some posts - not just testing it - later.

Is this all because I just turned 60?  :)

Here's the version for slang v1.

#v+
% whois.sl

define whois_postinghost () {

  variable status= is_article_visible ();

  if ( status & 1) {
    variable postinghost= extract_article_header ( "NNTP-Posting-Host");

    variable ph_exists= strlen ( postinghost);

    if ( ph_exists > 0) {
      () = system ( "whois "+postinghost+" | less");
    } else {
     error ("This article doesn't contain a NNTP-Posting-Host header");
    }

  } else {
    error ("You need to display the article to check");
  }

}

definekey ( "whois_postinghost", "\eH", "article");
#v-

I hope those delimiters work; I've never tried using them before, and I
hope the characters I *see* in Troy's posts are what one actually enters
when trying to delimit code.

I wonder why in the first-line comment it's not referred to as
whois_postinghost.sl .

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205294
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 07:39
57 lines
3544 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> John E. Davis wrote:
>>> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
>>> wrote:
>>>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>>>
>>> What version of slang are you using?  If you are using version 1, 
>>
>> Apparently this one:
>>
>> /usr/lib/libslang.so.1.4.9
>>
>>> you will need to replace lines such as
>>
>> I didn't have to edit his macro yesterday, when it worked fine.
>>
>> I await a comment from Troy on whether he switched slang version code in
>> the middle of this.  Because if he did, I may have to chew off one of
>> his legs next time he goes swimming in the ocean.
>
> EEEEEEKKKK.  
>
> The only code I changed was adding the "throw" lines
> and "if" conditions.  I just posted a version that should be
> compatible with both slang versions, and the one on my website is
> updated too.

:) I just posted a slang v1 version.  :)

I'll adapt yours, that...uh...goes both ways.

> Please don't eat my leg, I don't want to be hopping at the alter.

<licks sharkly lips>

>>>    throw InvalidParmError, "foo";
>>>    
>>> with
>>>
>>>    error ("foo");
>>>
>>> try/catch/throw/finally semantics were not added until version 2.
>>
>> I'll try this.  BRB.
>
> Beat ya.  :-P

Well, I actually did some *testing* before I posted the new code
that works here...   ;)


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205295
Author: Blinky the Shark
Date: Thu, 06 Sep 2007 07:40
21 lines
2741 bytes
Troy Piggins wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> Troy Piggins wrote:

>>> LOL thanks!  I'll have to send a group email to all the
>>> chicky-babes to let them know I'm off the market :)  There will
>>> be electrical smoke all over the place from their tears falling
>>> on their keyboards and shorting them out...
>>
>> Can you still see your monitor past that big head of yours?  ;)
>
> LOL.  I'm on a bit of a high right now.

I know what it's like.  I have three exes...


-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org  <----------- New Site Aug 28
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205296
Author: Troy Piggins
Date: Thu, 06 Sep 2007 07:55
72 lines
3980 bytes
* Blinky the Shark is quoted & my replies are inline below :
> John E. Davis wrote:
>> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
>> wrote:
>>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>>
>> What version of slang are you using?  If you are using version 1, 
>> you will need to replace lines such as
>>
>>    throw InvalidParmError, "foo";
>>    
>> with
>>
>>    error ("foo");
>>
>> try/catch/throw/finally semantics were not added until version 2.
>
> Bingo!  That got it, John.
>
> I sure can't figure out why I reported it working yesterday, after he
> added his header checks.  <scratches head>  And I could've sworn I used
> it on some posts - not just testing it - later.
>
> Is this all because I just turned 60?  :)
>
> Here's the version for slang v1.
>
> #v+
> % whois.sl
>
> define whois_postinghost () {
>
>   variable status= is_article_visible ();
>
>   if ( status & 1) {
>     variable postinghost= extract_article_header ( "NNTP-Posting-Host");
>
>     variable ph_exists= strlen ( postinghost);
>
>     if ( ph_exists > 0) {
>       () = system ( "whois "+postinghost+" | less");
>     } else {
>      error ("This article doesn't contain a NNTP-Posting-Host header");
>     }
>
>   } else {
>     error ("You need to display the article to check");
>   }
>
> }
>
> definekey ( "whois_postinghost", "\eH", "article");
> #v-
>
> I hope those delimiters work; I've never tried using them before, and I
> hope the characters I *see* in Troy's posts are what one actually enters
> when trying to delimit code.

Yep, looks fine here.

> I wonder why in the first-line comment it's not referred to as
> whois_postinghost.sl .

Because I have adopted whois.sl as the filename here, and that's
what I've quoted on my web page.  Sorry for the confusion.  Both
work.

-- 
Troy Piggins | http://piggo.com/~troy
** NEW whois.sl MACRO 5/9/07 **             ___  |   __   __    ,-O   (o-    O 
slrn macros and howto:                     |___  | |/   |/  |  O   )  //\     O
http://piggo.com/~troy/slrn                 ___| | |    |   |   `-O   V_/_  OOO
Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
#205297
Author: andrew
Date: Thu, 06 Sep 2007 07:57
28 lines
2802 bytes
On 2007-09-06, Troy Piggins <usenet-0709@piggo.com> wrote:
> * Blinky the Shark is quoted & my replies are inline below :
>> John E. Davis wrote:
>>> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark <no.spam@box.invalid>
>>> wrote:
>>>>http://blinkynet.net/stuff/comp/whois_macro_from_troy_site.jpg
>>>
>>> What version of slang are you using?  If you are using version 1, 
>>

A little late in the effort I have installed the macro and it works
beautifully. Thhis is the version taken from the website on sept 6
1700. Thanks for making the effort Troy!!

This is with:

andrew@ilium:~$ slrn --version
Slrn 0.9.8.1pl2.1 [2005-02-17]
        * Note: This version is a developer preview.
S-Lang Library Version: 2.1.1

Now to check out the spam merchants and nym-shifters :-)

           Andrew

-- 
Andrew's Corner
http://people.aapt.net.au/~adjlstrong/ubuntu_cli.html
Page 1 of 4 • 163 total messages
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