🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #217346

Re: [Dialog] Help with Scripting

#217346
From: MikeV06
Date: Sat, 01 Mar 2008 15:07
77 lines
2832 bytes
On Sat, 01 Mar 2008 06:54:01 GMT, Sqwertz wrote:

> Well, that didn't work either <sigh>.
> 
> I wonder what is about my installation that makes it act this
> way.  I guess I'll try reinstalling the base package again, and
> bring in my previous settings (as backup files) a few at a time.
> 
> -sw

Here is what I finally settled on:

program OnBeforeSendingMessage;

   {$I Include_AddAnyHeader.ds}   
   {$I Insert_Boxquotes.ds}   
  
function OnBeforeSendingMessage(
   var   Message    : TStringlist;
   const Servername : String;
   const IsEmail    : Boolean
) : Boolean;

begin
   //
   // if result is set to false, sending messages will *always* fail;
   // use this for debugging along with the messagebox.
   //
   result := true;
   //
   // This calls the add XNA: banter procedure
   AddAnyHeader ('X-No-Archive: banter', Message, IsEmail);
   AddAnyHeader ('X-Test: Box', Message, IsEmail);
   //
   if Message.count < 500 then BoxQuote( Message );
end;  // function OnBeforeSendingMessage()


BEGIN
end.  

Don't compile the included script:

// 
procedure AddAnyHeader(AddHeader:String; var Message:TStringlist;
IsEmail:Boolean);
var i: integer;
begin
   If not IsEmail then begin
      i := 1;
      while Message[i] <> '' do 
            i := i+1;
      Message.insert(i, AddHeader);
   end;
end;

It looks like it works for me. Box works too.

,---- [AddAnyHeader] 
| // 
| procedure AddAnyHeader(AddHeader:String; var Message:TStringlist;
| IsEmail:Boolean);
| var i: integer;
| begin
|    If not IsEmail then begin
|       i := 1;
|       while Message[i] <> '' do 
|             i := i+1;
|       Message.insert(i, AddHeader);
|    end;
| end;
'----

Mike


Technical Details
Message-ID: <70eohhm6jsz9$.dlg@mycomputer06.invalid>
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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!post01.iad01!news.suddenlink.net!not-for-mail
References: <ha9nabr6k714$.dlg@sqwertz.com> <cqn7m0wj9kcv$.vk7yc069kpim.dlg@40tude.net> <103fjr2c6hhb1$.dlg@sqwertz.com> <12uyxs6dtpk2o.dlg@sqwertz.com>

Show Full Headers
Complete Article Headers
Message-ID: <70eohhm6jsz9$.dlg@mycomputer06.invalid>
Subject: Re: [Dialog] Help with Scripting
Date: Sat, 1 Mar 2008 09:07:48 -0600
From: MikeV06 <me@mycomputer06.invalid>
References: <ha9nabr6k714$.dlg@sqwertz.com> <cqn7m0wj9kcv$.vk7yc069kpim.dlg@40tude.net> <103fjr2c6hhb1$.dlg@sqwertz.com> <12uyxs6dtpk2o.dlg@sqwertz.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!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!post01.iad01!news.suddenlink.net!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.41
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Organization: None
Archive: No
X-No-Archive: Yes
X-No-Archive: banter
X-Test: Box
Lines: 77
NNTP-Posting-Host: 74.194.81.60
X-Complaints-To: abuse@suddenlink.net