Article View: news.software.readers
Article #137475Re: Script for Follow-up Warning
From: Enrico Bauer
Date: Fri, 14 Nov 2003 12:08
Date: Fri, 14 Nov 2003 12:08
89 lines
3712 bytes
3712 bytes
14.11.2003 11:55:44, *Anders Eriksson*:
> Are there anyone that has created a script that inserts a warning/info in
> the message when a follow-up has been set when crossposting?
author: Lars Biskupek
AFAICS it's in the testing phase yet. So don't complain! ;-)
// ---------------------------------------------------------------------
program OnBeforeSendingMessage;
// ** Introduction for XPost/Fup2-Message
// ** change message as you want to
const
MessageXPost = 'X'+#39+'Posted to:';
MessageFup2 = 'F'+#39+'up2:';
// ** Begin of code
Procedure XPost_and_FUp2_Information (var Message: TStringlist;
Servername: string; IsEmail: boolean);
var
FUP2,
XPost,
Header: boolean;
i,
SigLine: integer;
s,
Fup2Group,
XPostGroups: string;
begin
if IsEmail=true then exit;
FUP2:=false;
XPost:=false;
Header:=true;
SigLine:=0;
for i:=0 to Message.count-1 do
begin;
s:= message.strings[i];
if s='' then header:=false;
if header=true then
begin;
if Pos('Followup-To:',s)>0 then
begin;
FUP2:=true;
Fup2Group:=copy(s,13,length(s)-12);
// WriteToLog(MessageFup2+Fup2Group,1);
end;
if Pos('Newsgroups:',s)>0 then
if Pos(',',s)>0 then
begin;
XPost:=true;
XPostGroups:=copy(s,12,length(s)-11);
// WriteToLog(MessageXPost+XPostGroups,1);
end;
end
else
if s='-- ' then
SigLine:=i;
// WriteToLog('Analysierte Zeile: '+s,1);
end;
if FUP2=true then
if Sigline=0 then
Message.Add(MessageFup2+Fup2Group)
else
Message.Insert(Sigline,MessageFup2+Fup2Group);
if XPost=true then
if Sigline=0 then
Message.Add(MessageXPost+XPostGroups)
else
Message.Insert(Sigline,MessageXPost+XPostGroups);
if (FUP2=true) or (XPost=true) then
if Sigline=0 then
Message.Add('')
else
Message.Insert(SigLine,'');
end;
function OnBeforeSendingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean):boolean;
begin;
result:=true;
XPost_and_FUp2_Information (Message, Servername, IsEmail);
end;
begin
end.
// ---------------------------------------------------------------------
Enrico B.
Technical Details
Message-ID:
<nzqeo4isilh$.dlg@ID-5349.user.dfncis.de>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!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.cwix.com!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!port-212-202-200-93.reverse.qsc.DE!not-for-mailReferences:
<9sb53eeig6y0$.dlg@morateknikutveckling.se>Show Full Headers
Complete Article Headers
Message-ID: <nzqeo4isilh$.dlg@ID-5349.user.dfncis.de> Subject: Re: Script for Follow-up Warning Date: Fri, 14 Nov 2003 13:08:02 +0100 From: Enrico Bauer <enrico.bauer@web.de> References: <9sb53eeig6y0$.dlg@morateknikutveckling.se> 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!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.cwix.com!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!port-212-202-200-93.reverse.qsc.DE!not-for-mail Newsgroups: news.software.readers Lines: 89 Reply-To: ebsms@web.de NNTP-Posting-Host: port-212-202-200-93.reverse.qsc.de (212.202.200.93) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1068811678 54358614 212.202.200.93 (16 [5349]) User-Agent: 40tude_Dialog/2.0.8.14 (d7f20a59.406.432) X-Face: "&aKKyoaJpNK$`uu7'woSmH_rFEuu~&'J|`sjOpDlW_9Cd=YY]\pE[~Y}vP:sU)lB(@dQ, a %K`.Y/hW2AE-!GbsoUh}#~7WA|~|u[u>+"NqU"7ZC>6)s#:5lP\m5~wL77|K