Filtering chat box

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Filtering chat box

Postby netiad » 16 Sep 2010, 14:07

Hello,

I added a check box to my winboard, Options->ICS ->"Ignore Personal Tells". With the goal of filtering out all receiving personal tells.

Can someone point me to the spot in the code where I can examine the incoming message to the chat box and if its a personal tell then drop that message so it never prints to the chat window?

Thanks.
netiad
 
Posts: 16
Joined: 16 Sep 2010, 03:02

Re: Filtering chat box

Postby H.G.Muller » 16 Sep 2010, 18:47

I suppose that with 'Chat Box' here you mean the ICS interaction window? The dedicated chat boxes would only accept tells when you explicitly asked them to capture tells from a specific handle.

Look for the second occurrence of ' chatPartner' in the file backend.c. There you find a section of code that figures out for all kind of text messages where it should go. In the end, when ' chattingPartner' is still -1, it does an 'i = oldi;', which resets the input pointer to just before the tell/shout/whisper/etc., so that it will be printed in the ICS interaction window.

What you would want to do is to force it into something similar to the 'else' part in case the message was a 'tell'. Except that you should set started = STARTED_CHATTER; and savingComment= FALSE; (it might already be that, but just to be safe). And you do not have to bother with parse and parse_pos.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Filtering chat box

Postby netiad » 17 Sep 2010, 01:58

That worked, I have it dropping only the personal tells.

Thanks!
netiad
 
Posts: 16
Joined: 16 Sep 2010, 03:02


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 0 guests