🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #261407

Re: Request help with 40tude dialog program syntax

#261407
From: Stijn De Jong
Date: Sat, 31 Dec 2016 20:51
34 lines
2155 bytes
Op Sat, 31 Dec 2016 20:00:07 +0000 (GMT), Rodney Pont schreef:

> Try;
> if identity == id1 then  
>    Remove_Headers='User-Agent: ,Message-ID: ';
> else if identity == id2 then
>    Remove_Headers='User-Agent: ,Content-Transfer-Encoding: ';
>  else
>    Remove_Headers='User-Agent: ,Mime-Version: '; 
> 
> = is an assignment operator, it makes the left side = to the right
> side, you need the double = for a comparison.
> 
> I'm not familiar with the scripting you are using but that's worth
> trying.

I'm not familiar with the scripting syntax either. :)
I don't understand why I can't redefine the variable "Remove_Headers".

Here's what happens when I use the suggested syntax above:
https://i.imgsafe.org/819a434db8.jpg

function From2Identity(from: String): String;
begin   
  if (StrMatch(from, 'Stijn De Jong <stijndekoning@nlnet.nl>')) then
    result := 'id1'  
    Remove_Headers='User-Agent: ,Message-ID: ';
  else if (StrMatch(from, 'First2 Last2 <email2@domain.com>')) then
    result := 'id2' 
    Remove_Headers='User-Agent: ,Content-Transfer-Encoding: ';
  else
    result := 'unknow'; 
    Remove_Headers='User-Agent: ,Mime-Version: '; 
end;
Technical Details
Message-ID: <o495ph$1t8$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
References: <o491jh$7jr$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tg71.pminews@ouse.infohit.me.uk>

Show Full Headers
Complete Article Headers
Message-ID: <o495ph$1t8$1@news.mixmin.net>
Subject: Re: Request help with 40tude dialog program syntax
Date: Sat, 31 Dec 2016 21:51:54 +0100
From: Stijn De Jong <stijndekoning@nlnet.nl>
References: <o491jh$7jr$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tg71.pminews@ouse.infohit.me.uk>
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: alt.windows7.general,news.software.readers
Organization: Mixmin
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 31 Dec 2016 20:52:02 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="f488a3b4fbd3c0b3b3a811b4d4a45852bb9fb7ae";
 logging-data="1960"; mail-complaints-to="abuse@mixmin.net"
X-Received-Bytes: 2034
X-Received-Body-CRC: 1000268174