🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #108683

[slrn] fido7 posting, X-Comment-To, quotation and followup prefix

#108683
From: Igor Ivanov
Date: Mon, 02 Sep 2002 18:57
94 lines
4388 bytes
Slrn 0.9.7.4 USENET+fido7 config:

---------------------------------- ~/.slrnrc ---------------------------
ignore_quotes	"^ ? ? ?[^ >]?[^ >]?[^ >]?[^ >]?>"
visible_headers "Date:,Followup-To: From: Newsgroups: Organization: Subject: User-Agent: X-Comment-To: X-Mailer: X-Newsreader:"

set query_next_article	0
set query_next_group	0
set use_metamail	0
set use_mime		1
set wrap_flags		7
set quote_string	">"
set query_read_group_cutoff 0
set mime_charset	"koi8-r"
set non_Xbrowser	"lynx %s"
set followup_string	"In %m, %r wrote:"
set reply_string	"In %n, you wrote:"
set cc_post_string	"[This message has also been posted.]"
set cc_followup_string	"[This message has also been posted to %n.]"

interpret ".slrn.sl"
---------------------------------- ~/.slrn.sl --------------------------
definekey("pipe_to_gnupg", "G", "article");

define get_key() {
  variable key, fp = popen("gpg -o - ~/.slrn.key", "r");
  () = fgets(&key, fp); () = pclose(fp);
  return key;
}

variable
  Default_Keyword = get_key(),
  Default_Realname = get_variable_value("realname"),
  Default_Quote_String = get_variable_value("quote_string"),
  Default_Custom_Headers = get_variable_value("custom_headers"),
  Default_Followup_String = get_variable_value("followup_string"),
  Default_Followup_Headers = get_variable_value("followup_custom_headers");

define pipe_to_gnupg () { pipe_article("gpg | $PAGER"); }

define get_first(s) {
  return substr(s, 1, 1);
}

define get_initial(s) {
  return strup(strjoin(array_map(String_Type, &get_first,
    strchop(str_delete_chars(s, "\"'()"), ' ', '\\')), ""));
}

define make_from_string_hook() {
  variable h = Default_Realname;
  !if(strncmp(current_newsgroup(), "fido7.", 6))
    h = sprintf("%s %s", h, Default_Keyword);
  return sprintf("%s <%s@%s>", h, get_variable_value("username"),
    get_variable_value("hostname"));
}

define post_hook() {
  variable h = Default_Custom_Headers;
  !if(strncmp(current_newsgroup(), "fido7.", 6))
    h = sprintf("%s\nX-Comment-To: All", h);
  set_string_variable("custom_headers", h);
}

define followup_hook() {
  variable q = Default_Quote_String, f = Default_Followup_String,
    h = Default_Followup_Headers;
  !if(strncmp(current_newsgroup(), "fido7.", 6)) {
    variable from;
    foreach(["Reply-To", "From"]) {
      variable header = ();
      from = extract_displayed_article_header(header);
      if(strlen(from)) break;
    }
    foreach(["\"\\(.+\\)\" <[^ ]+>", "[^ ]+ (\\(.+\\))", "\\(.+\\) [^ ]+"]) {
      variable pattern = ();
      if(string_match(from, pattern, 1)) {
	variable pos, len;
	(pos, len) = string_match_nth(1);
	from = substr(from, pos+1, len);
	q = sprintf(" %s%s", get_initial(from), q);
	break;
      }
    }
    variable to = extract_displayed_article_header("X-Comment-To");
    !if(strlen(to)) to = "All";
    f = sprintf("%%r ����� %s:", to);
    h = sprintf("%s\nX-Comment-To: %s", h, from);
  }
  set_string_variable("quote_string", q);
  set_string_variable("followup_string", f);
  set_string_variable("followup_custom_headers", h);
}
Technical Details
Message-ID: <slrnan7d47.26g.i+usenet@gambit.com.ru>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!demon!diablo.netcom.net.uk!netcom.net.uk!newsfeed.sovam.com!mtu.ru!news2.aha.ru!news.telekom.ru!gambit.com.ru!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrnan7d47.26g.i+usenet@gambit.com.ru>
Subject: [slrn] fido7 posting, X-Comment-To, quotation and followup prefix
Date: Mon, 02 Sep 2002 18:57:11 +0000
From: Igor Ivanov <i+usenet@gambit.com.ru>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!demon!diablo.netcom.net.uk!netcom.net.uk!newsfeed.sovam.com!mtu.ru!news2.aha.ru!news.telekom.ru!gambit.com.ru!not-for-mail
Newsgroups: news.software.readers
Supersedes: <slrnan3e0f.137.i+usenet@gambit.com.ru>
Followup-To: news.software.readers
Organization: http://www.slrn.org/
Lines: 93
NNTP-Posting-Host: peru.gambit.com.ru
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 8bit
X-Trace: berkeley.gambit.com.ru 1030993031 4939 194.190.206.62 (2 Sep 2002 18:57:11 GMT)
X-Complaints-To: abuse@gambit.com.ru
NNTP-Posting-Date: 2 Sep 2002 18:57:11 GMT
User-Agent: slrn/0.9.7.4 (FreeBSD)