🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #136278

Re: {[Dialog] Script writers?

#136278
From: Gember Breuk
Date: Mon, 27 Oct 2003 22:29
55 lines
2248 bytes
On Mon, 27 Oct 2003 12:04:17 -0500, Gember Breuk wrote:

That script did not post right, I try again!

program OnBeforeSavingMessage;

const pgp_head='-----BEGIN PGP SIGNED MESSAGE-----';
const pgp_hash='Hash:';
const pgp_sig_start='-----BEGIN PGP SIGNATURE-----';
const pgp_sig_end='-----END PGP SIGNATURE-----';
const maxint=2147483647;

procedure OnBeforeSavingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean);
var i,j:integer;
    s:string;
    pgp_signed:string;
       
begin
if isemail=true then exit;
s:=message.text;
i:=pos(pgp_head,s);

if i>0 then
   begin
   j:=i+pos(pgp_hash,copy(s,i,maxint));
   if j>i then
      begin
      delete(s,i,j-i+length(pgp_hash)+8);
      insert('',s,j);
      message.text:=s;
      end;
   end;

s:=message.text;
i:=pos(pgp_sig_start,s);
pgp_signed:='[---PGP signed---]';

   begin
   j:=i+pos(pgp_sig_end,copy(s,i,maxint));
   if j>i then
      begin
      delete(s,i,j-i+length(pgp_sig_end)+1);
      insert(pgp_signed,s,j);
      message.text:=s;
      end;
   end;  
end;

begin
end.


-- 
Gem
Technical Details
Message-ID: <1ddni81zvg1bc.dlg@news.aosrr.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!text1.nnrp.aus1!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.arcor-online.net!fu-berlin.de!uni-berlin.de!63.246.201.26!not-for-mail
References: <12txmxtn5irmt.dlg@news.aosrr.com> <HYydnbGo3avtdwGiRVn-uA@giganews.com> <1qq1pv0pv0yxu$.dlg@news.aosrr.com> <H-2dnVSHQZBL2gCiRVn-tw@giganews.com> <15jz30a9r940l$.dlg@news.aosrr.com>

Show Full Headers
Complete Article Headers
Message-ID: <1ddni81zvg1bc.dlg@news.aosrr.com>
Subject: Re: {[Dialog] Script writers?
Date: Mon, 27 Oct 2003 17:29:08 -0500
From: Gember Breuk <me@privacy.net>
References: <12txmxtn5irmt.dlg@news.aosrr.com> <HYydnbGo3avtdwGiRVn-uA@giganews.com> <1qq1pv0pv0yxu$.dlg@news.aosrr.com> <H-2dnVSHQZBL2gCiRVn-tw@giganews.com> <15jz30a9r940l$.dlg@news.aosrr.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!text1.nnrp.aus1!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.arcor-online.net!fu-berlin.de!uni-berlin.de!63.246.201.26!not-for-mail
Newsgroups: news.software.readers
Lines: 55
NNTP-Posting-Host: 63.246.201.26
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 1067293751 35954062 63.246.201.26 (16 [86162])
User-Agent: 40tude_Dialog/2.0.7.1 (5c533be4.53.464)
Archive: no
X-No-Archive: yes