Bug in ICS window, chat monologue

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

Moderators: hgm, Andres Valverde

Bug in ICS window, chat monologue

Postby velocidrom » 22 Apr 2014, 01:43

I tried to talk with a friend in FICS through the ICS Interaction window.
I entered his name at the top of the window and could indeed send him tells this way. However when he replied to me, I would not receive his speech in the chat section. I would receive his words through the general background window.
Screenshot attached: Image.
velocidrom
 
Posts: 44
Joined: 25 Sep 2012, 01:20

Re: Bug in ICS window, chat monologue

Postby H.G.Muller » 22 Apr 2014, 08:43

The ICS is not case sensitive in player handles, but XBoard is. So although you did not enter the Chat Partner with any upper-case letters (while the real user name has many), the ICS still accepts it in tell commands as the name of that player, and delivers the message. But when messages come in, the ICS properly capitalized them, and then XBoard doesn't think they are equal to the Chat Partner.

I guess it would not harm to make the comparison between sender of incoming messages and Chat Partner fields a case-insensitive compare, knowing that no ICS makes this distinction.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bug in ICS window, chat monologue

Postby velocidrom » 22 Apr 2014, 19:43

H.G.Muller wrote:The ICS is not case sensitive in player handles, but XBoard is. So although you did not enter the Chat Partner with any upper-case letters (while the real user name has many), the ICS still accepts it in tell commands as the name of that player, and delivers the message. But when messages come in, the ICS properly capitalized them, and then XBoard doesn't think they are equal to the Chat Partner.

I guess it would not harm to make the comparison between sender of incoming messages and Chat Partner fields a case-insensitive compare, knowing that no ICS makes this distinction.

I see, but then how do you explain the following screenshot?:
Image

I entered "acconcio" in the Chat Window, and my text could be sent and I could receive his text without any problem even though I had not capitalized the corresponding letters of his name. This situation occurs most of the time.
This is why I thought that when this fails, it is due to a bug and hence my thread here. :)
velocidrom
 
Posts: 44
Joined: 25 Sep 2012, 01:20

Re: Bug in ICS window, chat monologue

Postby H.G.Muller » 22 Apr 2014, 20:35

You are right. I checked the code, and it turns out I already use a case-insensitive compare to test if an incoming tell matches the Chat partner.

Can it be that there inadvertently was a space entered before or after the name in the Chat partner field? This would explain the behaviour, as it would spoil the equality of the handle extracted from the tell command (which is always stripped of surrounding spaces) and the contents of the Chat partner field. While an extra space in the sent command would be ignored by the ICS, which doesn't care if you separate name and message by one or two spaces. (In the worst case it would consider the extra space part of the message, but I don't even think it does that.) And it would not be obvious from the screen shot.

I am just guessing here, but this would explain everything (including the fact why in other cases everything seemed to work as intended). Perhaps I should make sure leading and trailing spaces are stripped off, when a new Chat partner is entered, to guard against this possibility.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bug in ICS window, chat monologue

Postby velocidrom » 23 Apr 2014, 02:12

H.G.Muller wrote:You are right. I checked the code, and it turns out I already use a case-insensitive compare to test if an incoming tell matches the Chat partner.

Can it be that there inadvertently was a space entered before or after the name in the Chat partner field? This would explain the behaviour, as it would spoil the equality of the handle extracted from the tell command (which is always stripped of surrounding spaces) and the contents of the Chat partner field. While an extra space in the sent command would be ignored by the ICS, which doesn't care if you separate name and message by one or two spaces. (In the worst case it would consider the extra space part of the message, but I don't even think it does that.) And it would not be obvious from the screen shot.

I am just guessing here, but this would explain everything (including the fact why in other cases everything seemed to work as intended). Perhaps I should make sure leading and trailing spaces are stripped off, when a new Chat partner is entered, to guard against this possibility.

I just tried to send a tell in a channel by adding a white space in front of the channel number. What it does is that it indeed sends the tell to that channel, but my text is not echoed into the ICS window, be it in the chat or in the background. I know I could send the text because I typed a command in FICS that sends me the tells from the last 5 minutes and my text appeared, even though it is totally invisible to me.
I tried to add a white space (and then 5 white spaces) after the channel number. What it does is that whenever I send a tell, there are white space in front of my text.
So it seems to me that this wasn't the case with what happened with AcCoNcIo. It is not the first time I experience the bug with acconcio and I don't know how to reproduce it.
velocidrom
 
Posts: 44
Joined: 25 Sep 2012, 01:20

Re: Bug in ICS window, chat monologue

Postby Dave Acevedo » 24 Apr 2014, 12:53

In Winboard 4.7.3 and earlier, how much earlier I dunno, sorry, I've noticed that the chat window set up for user X displays his channel tells the same as if it were incoming chat for me. Yes we do reside in the same channel at the time. Related?
Dave Acevedo
 
Posts: 21
Joined: 21 Jan 2007, 07:02

Re: Bug in ICS window, chat monologue

Postby H.G.Muller » 24 Apr 2014, 14:33

This is intentional. Many people answer in a shout or channel when you send them a tell. In the latest version such messages should be clearly marked as having come from a broadcast, rather than a personal tell.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bug in ICS window, chat monologue

Postby Dave Acevedo » 27 Apr 2014, 00:33

Thank You Harm. Best Regards.
Dave Acevedo
 
Posts: 21
Joined: 21 Jan 2007, 07:02

Re: Bug in ICS window, chat monologue

Postby lantonov » 03 Sep 2014, 18:42

Hey, acconcio (stoccafisso) is my friend on fics, too.
lantonov
 
Posts: 62
Joined: 28 Feb 2014, 08:43


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 9 guests