Group: news.software.readers
From: Blinky the Shark
Date: Thursday, September 06, 2007 2:37 AM
Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro

John E. Davis wrote:
> On 6 Sep 2007 06:02:50 GMT, Blinky the Shark < @ >
> wrote:
>> /stuff/comp/
>
> 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. 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+
%

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
.

--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
<----------- New Site Aug 28