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.

Ticket #1131: word_wrap_group_chat_messages.patch

File 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)

  • irc_im.c

    diff --git a/irc_im.c b/irc_im.c
    index 940f93b..62f5a54 100644
    a b static gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *b 
    625625        irc_t *irc = bee->ui_data;
    626626        irc_user_t *iu = bu->ui_data;
    627627        irc_channel_t *ic = c->ui_data;
    628         char *ts = NULL;
     628        char *wrapped, *ts = NULL;
    629629       
    630630        if( ic == NULL )
    631631                return FALSE;
    static gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *b 
    633633        if( sent_at > 0 && set_getbool( &bee->set, "display_timestamps" ) )
    634634                ts = irc_format_timestamp( irc, sent_at );
    635635       
    636         irc_send_msg( iu, "PRIVMSG", ic->name, msg, ts );
     636        wrapped = word_wrap( msg, 425 );
     637        irc_send_msg( iu, "PRIVMSG", ic->name, wrapped, ts );
    637638        g_free( ts );
    638639       
    639640        return TRUE;