🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #261654

Re: Request help with 40tude dialog program syntax

#261654
From: JJ
Date: Thu, 05 Jan 2017 16:06
58 lines
4363 bytes
On Wed, 4 Jan 2017 21:56:52 -0000 (UTC), Stijn De Jong wrote:
> 
> Thank you for that modified script, where I see that you left everything as
> it was and changed the part that needed to be changed, which was the way
> that the headers were defined for business versus for personal posts and
> emails.
> 
> Your script has no syntax errors and therefore I've been testing it but I
> haven't gotten it to actually work yet (which is why I haven't reported
> back until now because I was hoping to report a success).
> 
> The great thing is that the decision to have personal or business headers
> seems to be syntactically safe inside an ifthenelse.
> 
> But the bad news (so far) is that it doesn't do what it's supposed to do.
> 
> However, the original question was about the syntax for setting the header
> variable so now the problem is mine because it's about the program flow.
> 
> Since the hope is that others can also use this program, I do suggest that
> anyone using the wonderful program you provided add something like the
> following to the header comments.
> 
> // Source code: "http://pastebin.com/9kBWDbU8"
> // From: JJ <jj4public@vfemail.net> 
> // Newsgroups: news.software.readers,alt.windows7.general
> // Subject: Re: Request help with 40tude dialog program syntax
> // Date: Tue, 3 Jan 2017 23:07:15 +0700
> // Message-ID: <1ibo1gzmbqy5b.33119bupvh2q.dlg@40tude.net>
> // ACTION:
> // 1. Change identity as needed (search for "from,")
> // 2. Change newsgroup as needed (search for "newsgroup,")
> // 3. Change server as needed (search for "server,")
> // 4. Change header as needed (search for "Remove_Headers :"

Sorry. There was an error in the previous script. Please use this one. This 
time, I've tested it thoroughly. :)

<http://pastebin.com/2tMYRKM4>

I've changed it to include the ability to add new headers, and made it so 
that any identity may be empty. It'll be up to the main decision code to 
check each identity. Note that the string format for `Add_Headers` is 
different from `Remove_Headers` (see `AddHeader()` function comments and the 
example in the main decision code).

I've also added to more variables `ForEmail` and `ForNewsgroup` to indicate 
which type of message should be processed so that it's more flexible. Both 
can be `true` to add/remove headers on both message types. But both must not 
be `false`, otherwise nothing will be processed. The `RemoveHeaders()` 
function was changed for this purpose.

Since headers removal is performed first, then the headers insertion, you 
can use both `Remove_Headers` and `Add_Headers` to change any existing 
header. i.e. add if not exist, or change it if one exist. e.g.

  Remove_Headers:= 'User-Agent: ';
  Add_Headers:= 'User-Agent: Thunderbird 2086 (Windows 3000; NT9.0)'#13#10;
Technical Details
Message-ID: <7vpx5y09pu98.1sukl5d600sda$.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <o491jh$7jr$1@gioia.aioe.org> <o4926s$933$1@gioia.aioe.org> <o492qg$a9k$1@gioia.aioe.org> <1ibo1gzmbqy5b.33119bupvh2q.dlg@40tude.net> <o4h57j$hhe$6@news.mixmin.net> <o4jr33$u80$1@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <7vpx5y09pu98.1sukl5d600sda$.dlg@40tude.net>
Subject: Re: Request help with 40tude dialog program syntax
Date: Thu, 5 Jan 2017 23:06:19 +0700
From: JJ <jj4public@vfemail.net>
References: <o491jh$7jr$1@gioia.aioe.org> <o4926s$933$1@gioia.aioe.org> <o492qg$a9k$1@gioia.aioe.org> <1ibo1gzmbqy5b.33119bupvh2q.dlg@40tude.net> <o4h57j$hhe$6@news.mixmin.net> <o4jr33$u80$1@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers,alt.windows7.general
Lines: 58
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.albasani.net XwnFwKymUidKwFaKQFfMLq3f8wYvb3ceDHA06tlM6cwxoe7d/AopeAgEmz+p9Jph82YST1Wt0OCLX8miL0xrIQ==
NNTP-Posting-Date: Thu, 5 Jan 2017 16:06:18 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="57uwekyZ398i9KjsoDMQ4FWBtwXBHCoLXt00FtspdZugEaly+QoVWbvE9mJWT7on1t+m9xADu9zhy2S6D0ONEcp5eetr9niz9aV/p7r/5TUtPwA7LGZAx0yk2bPrKBHI"; mail-complaints-to="abuse@albasani.net"
User-Agent: 40tude_Dialog/2.0.15.84
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
Cancel-Lock: sha1:Kz/9VQZTgHswQs/n4pWPQoUsvh0=
X-Received-Body-CRC: 904608141
X-Received-Bytes: 4327