Article View: news.software.readers
Article #205293Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
From: Blinky the Shark
Date: Thu, 06 Sep 2007 07:37
Date: Thu, 06 Sep 2007 07:37
65 lines
3578 bytes
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
Technical Details
Message-ID:
<slrnfdvbit.2e8.no.spam@thurston.blinkynet.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <slrnfdtl54.3bm.pjr@pjr.gotdns.org> <20070906071300@usenet.piggo.com> <slrnfdudml.pcd.no.spam@thurston.blinkynet.net> <4cs3r4xvdp.ln2@news.gates-of-hell.com> <slrnfduhqt.r16.no.spam@thurston.blinkynet.net> <20070906124850@usenet.piggo.com> <slrnfdv03f.umd.no.spam@thurston.blinkynet.net> <20070906142412@usenet.piggo.com> <slrnfdv61p.u0.no.spam@thurston.blinkynet.net> <slrnfdv97q.b5u.davis@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrnfdvbit.2e8.no.spam@thurston.blinkynet.net> Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro Date: Thu, 06 Sep 2007 07:37:18 +0000 From: Blinky the Shark <no.spam@box.invalid> References: <20070905110242@usenet.piggo.com> <slrnfds2dc.vb2.no.spam@thurston.blinkynet.net> <slrnfds2sp.vb2.no.spam@thurston.blinkynet.net> <20070905120737@usenet.piggo.com> <slrnfds750.178.no.spam@thurston.blinkynet.net> <20070905150540@usenet.piggo.com> <slrnfdtl54.3bm.pjr@pjr.gotdns.org> <20070906071300@usenet.piggo.com> <slrnfdudml.pcd.no.spam@thurston.blinkynet.net> <4cs3r4xvdp.ln2@news.gates-of-hell.com> <slrnfduhqt.r16.no.spam@thurston.blinkynet.net> <20070906124850@usenet.piggo.com> <slrnfdv03f.umd.no.spam@thurston.blinkynet.net> <20070906142412@usenet.piggo.com> <slrnfdv61p.u0.no.spam@thurston.blinkynet.net> <slrnfdv97q.b5u.davis@aluche.mit.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.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Organization: http://blinkynet.net Lines: 65 X-Trace: individual.net LhbpwZUQDhs1ebxkFw/lhAE5g5MV90SP0iqLMytkZneezm8qlY Cancel-Lock: sha1:YrNHTNr051xP4rZr3eUI+bFQhWg= X-The-Usenet-Improvement-Project: http://blinkynet.net/comp/uip5.html X-Face: Jb-wQ7r&vrN}~8MC5B09S4&.ieh!Q:Di/XN.xrd#CU%; )bPa`Hm^(,3o$n(s75[P+$F+Q^4~Owj`WzkBtZU/#gL2BvEBm/e=/1,R0}d@q@)E X-OS: Mandriva 2006 Linux; kernel 2.6.12 X-WebTV-Stationery: Standard; BGColor=black; TextColor=black User-Agent: slrn/0.9.8.1 (Linux)