diff --git a/bashrc.d/slrn.bash b/bashrc.d/slrn.bash deleted file mode 100644 index e4449f1..0000000 --- a/bashrc.d/slrn.bash +++ /dev/null @@ -1 +0,0 @@ -export NNTPSERVER=news.xcski.com diff --git a/slrn/approved.sl b/slrn/approved.sl index 5e614c9..8593280 100644 --- a/slrn/approved.sl +++ b/slrn/approved.sl @@ -1,5 +1,3 @@ -% This variable will hold the followup_custom_headers as defined in the -% .slrnrc file. variable Default_Followup_Headers; Default_Followup_Headers = get_variable_value ("followup_custom_headers"); @@ -10,21 +8,43 @@ define followup_hook () h = Default_Followup_Headers; if ((0 == strncmp (current_newsgroup, "alt.sysadmin.recovery", 21)) | - (0 == strncmp (current_newsgroup, "alt.tech-support.recovery", 25)) | - (0 == strncmp (current_newsgroup, "bofh.", 5)) - ) + (0 == strncmp (current_newsgroup, "alt.tech-support.recovery", 25))) { % Generate Approved header h = sprintf ("%sApproved: probably not\n", h); } - if ((0 != strncmp(current_newsgroup, "comp.", 5)) & - (0 != strncmp(current_newsgroup, "rec.", 4)) & - (0 != strncmp(current_newsgroup, "bofh.", 5)) - ) - { - h = sprintf("%sX-No-Archive: Yes\n", h); - } + if (0 == strncmp (current_newsgroup, "bofh.", 5)) + { + % Generate Distribution header + h = sprintf ("%sDistribution: bofh\n", h); + } + set_string_variable ("followup_custom_headers", h); } + +variable Default_Custom_Headers; +Default_Custom_Headers = get_variable_value ("custom_headers"); +define post_hook () +{ + variable h; + + h = Default_Custom_Headers; + + if ((0 == strncmp (current_newsgroup, "alt.sysadmin.recovery", 21)) | + (0 == strncmp (current_newsgroup, "alt.tech-support.recovery", 25))) + { + % Generate Approved header + h = sprintf ("%sApproved: probably not\n", h); + } + + if (0 == strncmp (current_newsgroup, "bofh.", 5)) + { + % Generate Distribution header + h = sprintf ("%sDistribution: bofh\n", h); + } + + + set_string_variable ("custom_headers", h); +} \ No newline at end of file diff --git a/slrnrc b/slrnrc index 2fabe05..5383c0c 100644 --- a/slrnrc +++ b/slrnrc @@ -8,7 +8,7 @@ % "C:\\home\\file.txt" or "C:/home/file.txt" but NOT "C:\home\file.txt" % SERVER to NEWSRC mapping -%server "hsdndev.harvard.edu" ".jnewrc-hsdndev" +% server "geekom.local" ".jnewrc-geekom" %server "news.uni-stuttgart.de" ".jnewsrc-stuttgart" % The next line is for those servers that require a password. @@ -52,7 +52,6 @@ set reply_string "In %n, you wrote:" %Custom headers to add to NEW posts %set custom_headers "Approved: probably not\nX-No-Archive: yes\n" -set custom_headers "X-No-Archive: yes\n" % Custom headers for followup/reply. These can use format specifiers as % in the 'followup' string variable.