Page 1 of 1

Filtering chat box

PostPosted: 16 Sep 2010, 14:07
by netiad
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.

Re: Filtering chat box

PostPosted: 16 Sep 2010, 18:47
by H.G.Muller
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.

Re: Filtering chat box

PostPosted: 17 Sep 2010, 01:58
by netiad
That worked, I have it dropping only the personal tells.

Thanks!