Changeset eda54e4 for protocols/nogaim.c
- Timestamp:
- 2007-10-12T00:08:58Z (16 years ago)
- Branches:
- master
- Children:
- a6df0b5
- Parents:
- 82135c7 (diff), d444c09 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r82135c7 reda54e4 48 48 49 49 if(!mod) { 50 log_message(LOGLVL_ERROR, "Can't find `%s', not loading ", path);50 log_message(LOGLVL_ERROR, "Can't find `%s', not loading (%s)\n", path, g_module_error()); 51 51 return FALSE; 52 52 } … … 608 608 ( ( u->online == oo ) && ( oa == !u->away ) ) ) ) /* (De)voice people changing state */ 609 609 { 610 irc_write( ic->irc, ":%s MODE %s %cv %s", ic->irc->myhost, 611 ic->irc->channel, u->away?'-':'+', u->nick ); 610 char *from; 611 612 if( set_getbool( &ic->irc->set, "simulate_netsplit" ) ) 613 { 614 from = g_strdup( ic->irc->myhost ); 615 } 616 else 617 { 618 from = g_strdup_printf( "%s!%s@%s", ic->irc->mynick, ic->irc->mynick, 619 ic->irc->myhost ); 620 } 621 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, 622 u->away?'-':'+', u->nick ); 623 g_free( from ); 612 624 } 613 625 } … … 616 628 { 617 629 irc_t *irc = ic->irc; 630 char *wrapped; 618 631 user_t *u; 619 632 … … 658 671 strip_html( msg ); 659 672 660 while( strlen( msg ) > 425 ) 661 { 662 char tmp, *nl; 663 664 tmp = msg[425]; 665 msg[425] = 0; 666 667 /* If there's a newline/space in this string, split up there, 668 looks a bit prettier. */ 669 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strrchr( msg, ' ' ) ) ) 670 { 671 msg[425] = tmp; 672 tmp = *nl; 673 *nl = 0; 674 } 675 676 irc_msgfrom( irc, u->nick, msg ); 677 678 /* Move on. */ 679 if( nl ) 680 { 681 *nl = tmp; 682 msg = nl + 1; 683 } 684 else 685 { 686 msg[425] = tmp; 687 msg += 425; 688 } 689 } 690 irc_msgfrom( irc, u->nick, msg ); 673 wrapped = word_wrap( msg, 425 ); 674 irc_msgfrom( irc, u->nick, wrapped ); 675 g_free( wrapped ); 691 676 } 692 677 … … 750 735 { 751 736 struct im_connection *ic = c->ic; 737 char *wrapped; 752 738 user_t *u; 753 739 … … 762 748 strip_html( msg ); 763 749 750 wrapped = word_wrap( msg, 425 ); 764 751 if( c && u ) 765 irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", msg ); 752 { 753 irc_privmsg( ic->irc, u, "PRIVMSG", c->channel, "", wrapped ); 754 } 766 755 else 767 imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, msg ); 756 { 757 imcb_log( ic, "Message from/to conversation %s@0x%x (unknown conv/user): %s", who, (int) c, wrapped ); 758 } 759 g_free( wrapped ); 768 760 } 769 761
Note: See TracChangeset
for help on using the changeset viewer.