🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
9 messages
9 total messages Started by alvey Mon, 11 Jul 2005 10:32
[Dialog] Delete trolls + replies #2
#169065
Author: alvey
Date: Mon, 11 Jul 2005 10:32
29 lines
1938 bytes
Hi,

I'm trying out Dialog because, like Jackson Wallace in here on 3 July, I'd
like to have all replies to trolls (and the troll of course) "deleted" by
the newsreader. I've followed the methods suggested (hopefully correctly)
in that thread but the best result I've had so far doesn't do exactly what
I want. It's ignoring *all* posts descended from the Troll's post whereas I
only want to "delete" direct replies to the troll. To demonstrate, here's a
sample thread.

Poster A
   Troll replies to Poster A
      Poster B replies to Troll
      Poster C replies to Troll
          Poster D replies to Poster C

What I want to do here is; 
a) "delete" the Troll's post
b) "delete" Posters B & C direct replies to the Troll
c) Leave Poster D's effort.

Is this possible? 

cheers


alvey  

ps. Why do some of you people not allow Google to archive your posts?     
Re: [Dialog] Delete trolls + replies #2
#169071
Author: Bertel Lund Hansen
Date: Mon, 11 Jul 2005 11:55
29 lines
1935 bytes
alvey skrev:

> What I want to do here is; 
> a) "delete" the Troll's post
> b) "delete" Posters B & C direct replies to the Troll
> c) Leave Poster D's effort.
 
> Is this possible?

Short answer: No.

The only traces found in an answer to a message from "Troll" is
the message-id in the References:-header and possibly the opening
line ("Troll wrote"). Dialog is unable to filter on the contents
of the body.

If it were (Agent can for example do this), it would raise new
problems. The troll might not always use the same alias, and
others might write under the same name or alias - or accidentally
write it in some connection. A debate about how this specific
troll behaved in different groups, would for example be totally
crippled.

I have decided that no interesting subject will follow a
(sub)thread initiated by a troll. Ideally there ought to be no
answers at all.

-- 
Bertel, Denmark
Re: [Dialog] Delete trolls + replies #2
#169073
Author: alvey
Date: Mon, 11 Jul 2005 12:20
42 lines
2465 bytes
On Mon, 11 Jul 2005 13:55:56 +0200, Bertel Lund Hansen wrote:

> alvey skrev:
> 
>> What I want to do here is; 
>> a) "delete" the Troll's post
>> b) "delete" Posters B & C direct replies to the Troll
>> c) Leave Poster D's effort.
>  
>> Is this possible?
> 
> Short answer: No.

Damn. I didn't think so but one lives in hope.
> 
> The only traces found in an answer to a message from "Troll" is
> the message-id in the References:-header and possibly the opening
> line ("Troll wrote"). Dialog is unable to filter on the contents
> of the body.
> 
> If it were (Agent can for example do this), it would raise new
> problems. The troll might not always use the same alias, and
> others might write under the same name or alias - or accidentally
> write it in some connection. A debate about how this specific
> troll behaved in different groups, would for example be totally
> crippled.
> 
> I have decided that no interesting subject will follow a
> (sub)thread initiated by a troll. 

Agree. It's one of my personal usenet Laws in fact. 
And even though it'll mean missing a lot of posts I'm going to give the
"markread,ignore" approach a go. 

> Ideally there ought to be no answers at all.

Ideally I'd be filthy rich and good-looking.


Thanks for your time.

alvey
Re: [Dialog] Delete trolls + replies #2
#169079
Author: Bertel Lund Hansen
Date: Mon, 11 Jul 2005 13:50
10 lines
1280 bytes
alvey skrev:

>> Ideally there ought to be no answers at all.

> Ideally I'd be filthy rich and good-looking.

If you manage, please give me a hint!

-- 
Bertel, Denmark
Re: [Dialog] Delete trolls + replies #2
#169081
Author: Korbinian Abenthum
Date: Mon, 11 Jul 2005 14:30
26 lines
2204 bytes
Bertel Lund Hansen wrote:
> alvey skrev:

>> What I want to do here is; 
>> a) "delete" the Troll's post
>> b) "delete" Posters B & C direct replies to the Troll
>> c) Leave Poster D's effort.
>  
>> Is this possible?

> Short answer: No.
> 
> The only traces found in an answer to a message from "Troll" is
> the message-id in the References:-header and possibly the opening
> line ("Troll wrote"). Dialog is unable to filter on the contents
> of the body.

Well you can, if you use an OBSaving script that inserts a header if the
first line of the body contains "NameOfTheTroll".
You can then score on that one.

-- 
"Did you see the knives drawn? Did you hear the shouts, the screams, the
 cries for mercy?"  -  "Aye, I did, but I took no part. I was only the
 watcher, I swear it ..."  -  "Lord Umber, this one was only the watcher.
 Hang him last, so he may watch the others die."
Re: [Dialog] Delete trolls + replies #2
#169096
Author: Bertel Lund Hansen
Date: Mon, 11 Jul 2005 15:44
12 lines
1392 bytes
Korbinian Abenthum skrev:

> Well you can, if you use an OBSaving script that inserts a header if the
> first line of the body contains "NameOfTheTroll".

Could you show me such a script or just hint as to how to write
it?

I wouldn't use it, but I'd like to know.

-- 
Bertel, Denmark
Re: [Dialog] Delete trolls + replies #2
#169098
Author: Enrico Bauer
Date: Mon, 11 Jul 2005 16:30
16 lines
1845 bytes
11.07.2005 17:44:15, *Bertel Lund Hansen*:

> Korbinian Abenthum skrev:
>> Well you can, if you use an OBSaving script that inserts a header if the
>> first line of the body contains "NameOfTheTroll".
> Could you show me such a script

http://www.40tude.com/dialog/wiki/index.php/DeleteTOFU_and_do_BodyScoring

You need the bodyscoring part.

HTH
Enrico B.
-- 
No fear. No distractions. The ability to let that
which does not matter truly slide.
Re: [Dialog] Delete trolls + replies #2
#169102
Author: Korbinian Abenthum
Date: Mon, 11 Jul 2005 17:07
76 lines
3748 bytes
Bertel Lund Hansen wrote:
> Korbinian Abenthum skrev:

>> Well you can, if you use an OBSaving script that inserts a header if the
>> first line of the body contains "NameOfTheTroll".

> Could you show me such a script or just hint as to how to write
> it?

There already is a bodyscoring script in the Wiki which inserts a header if
a certain keyword is found in the body:
http://www.40tude.com/DIALOG/wiki/index.php/DeleteTOFU_and_do_BodyScoring
That one's pretty huge, though, and it tries to find it in the complete
body, which would provoke the problems you mentioned.

> I wouldn't use it, but I'd like to know.

Basically it's very easy: Just walk through the lines of the article using
the message.strings array.
Like so:

| program OnBeforeSavingMessage;
| 
| const NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN = 1;
| 
| procedure BodyscoreTrolls( var message :TStringlist;
|                            const servername :string;
|                            const isEmail :boolean);
| var i             : integer;
|     firstBodyLine : integer;
| 
| begin 
| 
|   if message.Count<=0 then exit;
| 
|   // Find the end of the header
|   i := 0;
|   while (message.strings[i]<>'') do begin
|       i := i + 1;
|   end;
|   firstBodyLine := i+1;
|   
|   // Scan the first NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN lines in the body
|   // for a keyword
|   for i:=1 to NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN do begin
| 
|       // Replace NameOfTheTroll with the keyword you're looking for
|       if (AnsiPos(message.strings[i], 'NameOfTheTroll')>0) then begin
|           message.insert(0, 'X-Troll-Reply: NameOfTheTroll');
|           exit;
|       end;
|   end;
| end;
| 
| procedure OnBeforeSavingMessage( 
|     var    Message    : TStringlist; 
|     const  Servername : string;
|     const     IsEmail : boolean
| );
| 
| begin
|    BodyscoreAttributionLines(Message, Servername, IsEmail );
| end;
| 
| begin
| end.

Should work if you compile that as your OnBeforeSaving-Script.
To score on it, use
| !delete Header {^X-Troll-Reply: }

Note that you need to retrieve the body before you can delete it!

-- 
"Rhaegar fought valiantly, Rhaegar fought nobly, Rhaegar fought honorably.
 And Rhaegar died."                                        (Jorah Mormont)
Re: [Dialog] Delete trolls + replies #2
#169103
Author: Korbinian Abenthum
Date: Mon, 11 Jul 2005 17:12
75 lines
3945 bytes
Bertel Lund Hansen wrote:
> Korbinian Abenthum skrev:

>> Well you can, if you use an OBSaving script that inserts a header if the
>> first line of the body contains "NameOfTheTroll".

> Could you show me such a script or just hint as to how to write
> it?

There already is a bodyscoring script in the Wiki which inserts a header if
a certain keyword is found in the body:
http://www.40tude.com/DIALOG/wiki/index.php/DeleteTOFU_and_do_BodyScoring
That one's pretty huge, though, and it tries to find it in the complete
body, which would provoke the problems you mentioned.

> I wouldn't use it, but I'd like to know.

Basically it's very easy: Just walk through the lines of the article using
the message.strings array.
Like so:

| program OnBeforeSavingMessage;
| 
| const NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN = 1;
| 
| procedure BodyscoreAttributionLines( var message :TStringlist;
|                                      const servername :string;
|                                      const isEmail :boolean);
| var i                   : integer;
|     headerBodySeparator : integer;
| 
| begin 
| 
|   if message.Count<=0 then exit;
| 
|   // Find the end of the header
|   i := 0;
|   while (message.strings[i]<>'') do begin
|       i := i + 1;
|   end;
|   headerBodySeparator := i;
|   
|   //Scan the first NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN lines in the body
|   //for a keyword
|   for i:=1 to NUMBER_OF_ATTRIBUTION_LINES_TO_SCAN do begin
|         if (AnsiPos('NameOfTheTroll', message.strings[headerBodySeparator+i])>0) then begin
|           message.insert(0, 'X-Troll-Reply: NameOfTheTroll');
|           exit;
|       end;
|   end;
| end;
| 
| procedure OnBeforeSavingMessage( 
|     var    Message    : TStringlist; 
|     const  Servername : string;
|     const     IsEmail : boolean
| );
| 
| begin
|    BodyscoreAttributionLines(Message, Servername, IsEmail );
| end;
| 
| begin
| end.

Should work if you compile that as your OnBeforeSaving-Script.
To score on it, use
| !delete Header {^X-Troll-Reply: }

Note that you need to retrieve the body before you can delete it!

[Superseded because of an error.]
-- 
"Rhaegar fought valiantly, Rhaegar fought nobly, Rhaegar fought honorably.
 And Rhaegar died."                                        (Jorah Mormont)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads