[Pidgin Plugins] #471: autodetect IRC server message truncation
Pidgin Plugins
plugins-trac at guifications.org
Wed Jan 30 17:18:24 CST 2008
#471: autodetect IRC server message truncation
------------------------------+---------------------------------------------
Reporter: tmetro | Owner:
Type: FeatureRequest | Status: closed
Milestone: | Component: PluginPack
Version: PluginPack2.2.0 | Severity: major
Resolution: wontfix | Keywords:
Pending: 0 |
------------------------------+---------------------------------------------
Changes (by jbailey):
* status: new => closed
* resolution: => wontfix
Comment:
The IRC specification mandates that no IRC message may be longer than 512
characters. Since every IRC message must end with a carriage return and a
line feed, this reduces the available character count to 510. Actual
messages are sent with the PRIVMSG command, with the format "PRIVMSG
target :text", thus reducing the 510 characters by 8 characters (length of
PRIVMSG plus following space) plus the length of the target's name (user
or channel), plus 2 (space following target's name and the : before the
message's text).
For a practical example, if you are sending a message to #guifications on
irc.freenode.net, here is what gets sent:
{{{
PRIVMSG #guifications :This is my test message.\r\n
}}}
(where \r and \n are carriage return and line feed, respectively). As
stated above, you lose 2 characters for the line termination, 8 characters
for PRIVMSG and space, and 2 more for a space and :. Here you also lose
an additional 13 characters due to the length of the target's name, in
this case #guifications, thus your message can be exactly 487 characters.
This is a well-known IRC limit and has been in place for as long as the
IRC protocol has existed (over 15 years). I don't see a reason for us to
hack around this bug in IRCHelper, nor do I see a reason to hack around it
in libpurple proper. Libpurple doesn't autosplit for any protocol, and
implementing it for IRC would set a bad precedent. IRCHelper is intended
to make IRC behave more like other protocols in Pidgin; it does that quite
well and has no need to go beyond that scope.
--
Ticket URL: <http://plugins.guifications.org/trac/ticket/471#comment:1>
Pidgin Plugins <http://pidgin.guifications.org/>
Plugins for the Instant Messaging client Pidgin and its backend library libpurple
More information about the Plugins-tickets
mailing list