Some messages addressed to a user are lost #174

Closed
cwc opened this Issue Oct 16, 2012 · 10 comments

Projects

None yet

2 participants

Contributor
cwc commented Oct 16, 2012

This happens sporadically, but if someone addresses a message to me, e.g.:

cwc: Lorem ipsum dolor

It will occasionally get sent to me as:

:cwc:

This doesn't just happen when it's my username, either. When others are talking to each other in a room, sometimes their message is mangled as shown.

Contributor
cwc commented Oct 29, 2012

I checked the debug logs and found that the mangled messages are actually written to the websocket that way, so it's definitely a server-side thing.

Owner

Can you find a reproduce case?

Contributor
cwc commented Nov 7, 2012

Have not been able to consistently reproduce yet. Also worth noting that it happens in some PMs as well.

Contributor
cwc commented Nov 9, 2012

Just found one! My coworker @DDRBoxman sent me a message that ended with the :D emoticon. The message I receive after it's mangled by the server always starts with :<word> where <word> is the first word of the message they were trying to send.

Owner

@cwc thanks I'll dig into it this weekend

Contributor
cwc commented Nov 14, 2012

Looking into it a bit myself.

FWIW, the messages are going into the database just fine, but reconnecting on the client side still shows messages in the mangled format once it reaches the client.

EDIT: Actually, I take that back. Working with two separate Subway users talking to each other in chat, a mangled message received by one user goes into the DB linked to that user with the message mangled. The Subway user that sent the message has the original text show up in the DB correctly.

Owner

Is there any client side error during this?

Contributor
cwc commented Nov 14, 2012

Actually I'm 99% sure this is a node-irc bug now. If you check out irc/lib/irc.js around line 463 (case "PRIVMSG":), the text variable is set to message.args[1]. This is what leads to only the first word in a message containing an emoticon being set to that variable.

I'm playing around with a solution involving splicing the rest of the message.args array.

Contributor
cwc commented Nov 14, 2012

Okay, it's actually this logic: https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L875-882

It's trying to parse something out, I assume having to do with the IRC protocol. I think it's buggy.

@cwc cwc referenced this issue in martynsmith/node-irc Nov 14, 2012
Closed

Colons in user messages cause issues #122

Contributor
cwc commented Nov 14, 2012

Closing since it's not actually a Subway bug.

@cwc cwc closed this Nov 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment