Page 1 of 1

Bug in ICS window, chat monologue

PostPosted: 22 Apr 2014, 01:43
by velocidrom
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.

Re: Bug in ICS window, chat monologue

PostPosted: 22 Apr 2014, 08:43
by H.G.Muller
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.

Re: Bug in ICS window, chat monologue

PostPosted: 22 Apr 2014, 19:43
by velocidrom
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. :)

Re: Bug in ICS window, chat monologue

PostPosted: 22 Apr 2014, 20:35
by H.G.Muller
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.

Re: Bug in ICS window, chat monologue

PostPosted: 23 Apr 2014, 02:12
by velocidrom
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.

Re: Bug in ICS window, chat monologue

PostPosted: 24 Apr 2014, 12:53
by Dave Acevedo
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?

Re: Bug in ICS window, chat monologue

PostPosted: 24 Apr 2014, 14:33
by H.G.Muller
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.

Re: Bug in ICS window, chat monologue

PostPosted: 27 Apr 2014, 00:33
by Dave Acevedo
Thank You Harm. Best Regards.

Re: Bug in ICS window, chat monologue

PostPosted: 03 Sep 2014, 18:42
by lantonov
Hey, acconcio (stoccafisso) is my friend on fics, too.