% -*- mode: slang; mode: fold; -*- % % de_spy v0.5 [by Tomasz 'tsca' Sienicki, ] % [] %{{{ Description: % Goes to the current article author's posting profile on Dejanews % This macro is gonna work as long as dejanews doesn't change their % URL. It's fun and a great weapon in flamewars! :) % Usage: % Save this macro as "macro.sl" file, and add a following line to .slrnrc % interpret "macro.sl" % % If you don't change anything, the function will be available under F2 % % Yahoo! Geocities disallows *.sl extensions, and corrupts *.sl.gz % files. That is why this file has a *.txt extension. You might want % to change it back to *.sl % %}}} define de_spy () { variable whois = extract_article_header ("From"), re,wann,hvr,lan,nm_,ae_,browser=get_variable_value("non_Xbrowser"); wann = string_match(whois,"\\C\\(\\<[-_0-9a-z.]*@[^.][-_0-9a-z.]*\\>\\)",1); if(wann) {(hvr,lan)=string_match_nth(1); ae_ = substr (whois, hvr+1, lan);} else error ("No email address has been found"); ae_ = read_mini (sprintf("Search DN for <%s>?",ae_),"",ae_); ae_=sprintf("http://www.deja.com/=dnc/profile.xp?author=%s&ST=PS",ae_); if (browser == "") { re=get_yes_no_cancel ("No browser defined! Try lynx?"); !if (re == 1) { message ("\"de_spy\" terminated: No browser available."); break; } browser = "lynx \"%s\""; } system (sprintf (browser,ae_)); } definekey ("de_spy", "[[B", "article");