Article View: news.software.readers
Article #136253Re: {[Dialog] Script writers?
From: Gember Breuk
Date: Mon, 27 Oct 2003 17:04
Date: Mon, 27 Oct 2003 17:04
73 lines
2775 bytes
2775 bytes
On Mon, 27 Oct 2003 17:28:26 +0100, Jarrod Cifer wrote:
> Gember Breuk, upon reaching Nirvana, postulated:
>
>> Yes, I think so! Did you just put that on Wiki? I didn't see it before
>> this... :-)
>
> Yes, a few hours ago.
>
>> If I make it work, you will get all credit! Thank you!
>
> Marcus Mรถnnig wrote it, so he should get the credit.
I see that in Wiki now, but you showed me, so you get some credit
too... :-)
I want to try Matija's script so maybe it might do it better, but this
is script I have working now:
<---------------------->
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;
blank_line:string;
pgp_signed:string;
begin
if isemail=true then exit;
s:=message.text;
i:=pos(pgp_head,s);
blank_line:='';
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(blank_line,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:
<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!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!63.246.201.26!not-for-mailReferences:
<12txmxtn5irmt.dlg@news.aosrr.com> <HYydnbGo3avtdwGiRVn-uA@giganews.com> <1qq1pv0pv0yxu$.dlg@news.aosrr.com> <H-2dnVSHQZBL2gCiRVn-tw@giganews.com>Show Full Headers
Complete Article Headers
Message-ID: <15jz30a9r940l$.dlg@news.aosrr.com>
Subject: Re: {[Dialog] Script writers?
Date: Mon, 27 Oct 2003 12:04:17 -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>
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!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!63.246.201.26!not-for-mail
Newsgroups: news.software.readers
Lines: 73
NNTP-Posting-Host: 63.246.201.26
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 1067274261 36040193 63.246.201.26 (16 [86162])
User-Agent: 40tude_Dialog/2.0.7.1 (cf4f2d36.244.273)
Archive: no
X-No-Archive: yes