User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Build ID: 20121010223843 Steps to reproduce: Typed a line in IRC which was to long for the IRC protocol Actual results: The line was cut after 512 characters as described in the IRC specification Expected results: A. The input box should not allow more than 512 characters OR (better) B. Thunderbird should cut the text in several 512 long lines to meet the IRC specification. PS: A warning dialog for too long overall text (for example a message who would create more then 10 irc lines) should appear, would be also nice to have, in case of clipboard accidents.
(In reply to Markus Majer from comment #0) > The line was cut after 512 characters as described in the IRC specification For reference from RFC 2812, Section 2.3: > IRC messages are always lines of characters terminated with a CR-LF > (Carriage Return - Line Feed) pair, and these messages SHALL NOT > exceed 512 characters in length, counting all characters including > the trailing CR-LF. Thus, there are 510 characters maximum allowed > for the command and its parameters. There is no provision for > continuation of message lines. See section 6 for more details about > current implementations. The tricky part of this is that the message CONTENT isn't what is limited to 512 characters, it is the message itself. (And some servers will do stupid things like if I sent a message that is exactly 512 characters, but it has to send it out in such a way that extra characters are added...it will silently drop the extra characters.) > B. Thunderbird should cut the text in several 512 long lines to meet the IRC > specification. The corresponding Instantbird bug suggests implementing this . (That has a proof of concept code to split a message on spaces, if possible. It should be fairly easy for someone to convert this into a patch.) > PS: A warning dialog for too long overall text (for example a message who > would create more then 10 irc lines) should appear, would be also nice to > have, in case of clipboard accidents. For what it's worth we do set the maxMessageLength to 512 . I'm unsure of the Thunderbird UI uses this information (Instantbird shows a counter when you get too close, I believe). Showing a warning dialog seems excessive, we should just be able to handle it gracefully.  http://lxr.instantbird.org/instantbird/source/chat/protocols/irc/irc.js#680  https://bugzilla.instantbird.org/show_bug.cgi?id=1712
(In reply to Markus Majer from comment #0) > B. Thunderbird should cut the text in several 512 long lines to meet the IRC > specification. This was done as part of bug 812921.