Article View: news.software.readers
Article #136231Re: {[Dialog] Script writers?
From: Gember Breuk
Date: Mon, 27 Oct 2003 04:20
Date: Mon, 27 Oct 2003 04:20
85 lines
2965 bytes
2965 bytes
On Mon, 27 Oct 2003 00:07:51 +0100, matija wrote:
> Gember Breuk, completely geschtonkenflapped, wrote:
>> Some friends I tell about Dialog are asking me about some scripts. I'm
>> not good with them, so I ask here where the good script writers are.
>
> i'd like to know the same thing ;)
Ok, my English is not so good... :-)
>> One asks about a script to remove PGP sigs from displayed message, but
>> my own try did not do it yet.
>
> that shouldn't be too hard. post your code here and we'll see
> if we can do something about it.
This script works some, but I don't know yet how to do a variable for
different sizes at the bottom.
program OnBeforeSavingMessage;
procedure OnBeforeSavingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean);
var i,j:integer;
s:string;
pgphead:string;
newhead:string;
hash:string;
newhash:string;
pgpfoot:string;
newfoot:string;
begin
if isemail then exit;
pgphead:='-----BEGIN PGP SIGNED';
newhead:='(PGP sig removed)';
hash:='Hash: ';
newhash:='';
pgpfoot:='-----BEGIN PGP SIGNAT';
newfoot:='';
for i:=0 to Message.count-1 do
begin
s:=message.strings[i];
j:=pos(pgphead,s);
if j>0 then
begin
delete(s,j,length(pgphead)+15);
insert(newhead,s,j);
message.strings[i]:=s;
end;
end;
for i:=0 to Message.count-1 do
begin
s:=message.strings[i];
j:=pos(hash,s);
if j>0 then
begin
delete(s,j,length(hash)+10);
insert(newhash,s,j);
message.strings[i]:=s;
end;
end;
for i:=0 to Message.count-1 do
begin
s:=message.strings[i];
j:=pos(pgpfoot,s);
if j>0 then
begin
delete(s,j,length(pgpfoot)+10);
insert(newfoot,s,j);
message.strings[i]:=s;
end;
end;
end;
begin
end.
--
Gem
Technical Details
Message-ID:
<5hqzswgsdayo.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!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!alb-24-195-70-1.nycap.rr.COM!not-for-mailReferences:
<12txmxtn5irmt.dlg@news.aosrr.com> <1deejdf59cdc1.dlg@shpongle.604>Show Full Headers
Complete Article Headers
Message-ID: <5hqzswgsdayo.dlg@news.aosrr.com>
Subject: Re: {[Dialog] Script writers?
Date: Sun, 26 Oct 2003 23:20:46 -0500
From: Gember Breuk <me2@privacy.net>
References: <12txmxtn5irmt.dlg@news.aosrr.com> <1deejdf59cdc1.dlg@shpongle.604>
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!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!alb-24-195-70-1.nycap.rr.COM!not-for-mail
Newsgroups: news.software.readers
Lines: 85
NNTP-Posting-Host: alb-24-195-70-1.nycap.rr.com (24.195.70.1)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 1067228448 35218766 24.195.70.1 (16 [86162])
User-Agent: 40tude_Dialog/2.0.7.1 (70e463cc.167.322)
Archive: no
X-No-Archive: yes