- Timestamp:
- 2007-10-12T00:06:50Z (17 years ago)
- Branches:
- master
- Children:
- 3933853, c78c032, eda54e4
- Parents:
- 285b55d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r285b55d rd444c09 606 606 { 607 607 irc_t *irc = ic->irc; 608 char *wrapped; 608 609 user_t *u; 609 610 … … 648 649 strip_html( msg ); 649 650 650 while( strlen( msg ) > 425 ) 651 { 652 char tmp, *nl; 653 654 tmp = msg[425]; 655 msg[425] = 0; 656 657 /* If there's a newline/space in this string, split up there, 658 looks a bit prettier. */ 659 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strrchr( msg, ' ' ) ) ) 660 { 661 msg[425] = tmp; 662 tmp = *nl; 663 *nl = 0; 664 } 665 666 irc_msgfrom( irc, u->nick, msg ); 667 668 /* Move on. */ 669 if( nl ) 670 { 671 *nl = tmp; 672 msg = nl + 1; 673 } 674 else 675 { 676 msg[425] = tmp; 677 msg += 425; 678 } 679 } 680 irc_msgfrom( irc, u->nick, msg ); 651 wrapped = word_wrap( msg, 425 ); 652 irc_msgfrom( irc, u->nick, wrapped ); 653 g_free( wrapped ); 681 654 } 682 655 … … 737 710 { 738 711 struct im_connection *ic = c->ic; 712 char *wrapped; 739 713 user_t *u; 740 714 … … 749 723 strip_html( msg ); 750 724 725 wrapped = word_wrap( msg, 425 ); 751 726 if( c && u ) 752 irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", msg ); 727 { 728 irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", wrapped ); 729 } 753 730 else 754 imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg ); 731 { 732 imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, wrapped ); 733 } 734 g_free( wrapped ); 755 735 } 756 736
Note: See TracChangeset
for help on using the changeset viewer.