close Warning: Failed to sync with repository "(default)": [Errno 12] Cannot allocate memory; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
Modify

#1131 closed defect (fixed)

Split long lines doesn't work on groupchat

Reported by: beat Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.2.1
Keywords: patch Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro: Arch Linux

Description

BitlBee splits lines longer than the max size supported by IRC. This doesn't seem to work on Jabber's groupchats and long lines end up you being cut (instead of split into multiple lines).

Attachments (1)

word_wrap_group_chat_messages.patch (773 bytes) - added by dx at 2014-02-20T10:30:32Z.
Word wrapping for group chat messages (copied from user messages)

Download all attachments as: .zip

Change History (9)

comment:1 Changed at 2014-02-17T13:44:08Z by beat

I must add that this only happens when using groupchats. If I'm private messaging someone, long lines are split correctly.

comment:2 Changed at 2014-02-17T13:50:33Z by dx

Oh, interesting! Could you try enabling the xmlconsole and posting some relevant messages that don't get split correctly? (they will appear split in the xmlconsole, which will be a bit hard to read...). Also you might want to remove any jabber addresses from the output.

comment:3 Changed at 2014-02-17T22:59:05Z by beat

Hi dx,

Here you go: https://gist.github.com/andrebeat/fbd3469d7b551947042f/raw/a53391cebe04719830270ad63cc21cb6bdad146b/xmlconsole

As you can see, the message was truncated at around ~430 characters and the rest of the message isn't shown in the groupchat.

comment:4 Changed at 2014-02-17T23:10:48Z by beat

Although in the example I've given you it doesn't happen, I've seen it truncate in the middle of a word. So I'm guessing this function irc_splitlines isn't being called somewhere? I'm not familiar with the codebase.

Changed at 2014-02-20T10:30:32Z by dx

Word wrapping for group chat messages (copied from user messages)

comment:5 Changed at 2014-02-20T10:32:35Z by dx

Keywords: patch added

Seems like it was a trivial patch. I haven't tested it because lazy. Tell me if it works.

comment:6 Changed at 2014-02-20T11:20:46Z by beat

Hello dx,

I just tried your patch and it solved the problem. Thanks for the help and fast response ;-)

Cheers!

comment:7 Changed at 2014-02-20T12:26:20Z by dx

Awesome! Thanks for testing it!

comment:8 Changed at 2014-03-01T02:18:24Z by dx

Resolution: fixed
Status: newclosed

Applied in r1012!

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.