🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #205291

Re: Update: [slrn] NNTP-Posting-Host whois lookup macro

#205291
From: 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
Technical Details
Message-ID: <20070906172054@usenet.piggo.com>
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.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!newsfeed.asianetcom.net!news.waia.asn.au!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
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>

Show Full Headers
Complete Article Headers
Message-ID: <20070906172054@usenet.piggo.com>
Subject: Re: Update: [slrn] NNTP-Posting-Host whois lookup macro
Date: Thu, 06 Sep 2007 17:24:09 +1000
From: Troy Piggins <usenet-0709@piggo.com>
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.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!newsfeed.asianetcom.net!news.waia.asn.au!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
Newsgroups: news.software.readers
Reply-To: usenet-0709@piggo.com
X-NNTP-Proxy: Leafnode-2
 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/)
User-Agent: slrn/0.9.8.1pl2.1/rt (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 48
NNTP-Posting-Host: 124.171.193.207
X-Trace: 1189063452 per-qv1-newsreader-01.iinet.net.au 28563 124.171.193.207
X-Original-Bytes: 3106