% Filename: whois.sl % Version: 0.9.1 % Author: Troy Piggins % 0.9.1 - added user defineable pager % You need 'whois' and a pager for this macro to work. Please check the pager % path below. define whois_postinghost () { % set the path to your favourite pager here variable pager="/usr/bin/less"; % variable pager="/usr/local/share/vim/vim70/macros/less.sh"; % variable pager="/usr/local/bin/most"; 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+" | "+pager); } else { error ("This article doesn't contain a NNTP-Posting-Host header"); % throw InvalidParmError, "This article doesn't contain a NNTP-Posting-Host header"; } } else { error ("You need to display the article to check"); % throw InvalidParmError, "You need to display the article to check"; } } definekey ( "whois_postinghost", "\eH", "article");