(I remember we had a discussion about this in #chatzilla aaaaaages ago, but apparently we never filed a bug) Reasoning: To reflect that messages never contain newlines, we should split the messages at display time already. This will also inform the user that they're "spamming" if they send a multiline message. Furthermore, the <br>s we insert cause problems in the a11y code of Mozilla. This is a bug in there, but I severely doubt it will get fixed for 1.9, and we should try to work around it given it is a more exact representation of what happens anyway. Because we don't want to remove the splitting feature from the IRC library, I believe we should split it out of messageTo, leave it in the library, and add a flag (true by default) on the network indicating whether messageTo should still employ the code, or that it can assume that the splitting has been done, and then employ the splitting in ChatZilla's UI code (and set the flag to false).
Created attachment 318852 [details] [diff] [review] Simplify some code This is really an initial step, to remove some code duplication. Doing this first, I *think* will make life easier afterwards. Though I could be wrong. I think it's a good change to take anyway. (note: this bug is actually much harder than I thought :-( )
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #318852 - Flags: review?(silver)
Created attachment 318903 [details] [diff] [review] Patch This patch actually works. Cough. :-) Seriously though, it's basically the same as the last one, but now with the split code copied across to static.js, and used to send as well as display line by line. Things should work like this, though I just realized that I should probably include another comment in irc.js that those lines are copied to static.js, and to keep them in sync.
Checking in mozilla/extensions/irc/xul/content/commands.js; /cvsroot/mozilla/extensions/irc/xul/content/commands.js,v <-- commands.js new revision: 1.152; previous revision: 1.151 done Checking in mozilla/extensions/irc/xul/content/static.js; /cvsroot/mozilla/extensions/irc/xul/content/static.js,v <-- static.js new revision: 1.271; previous revision: 1.270 done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.