- Timestamp:
- 2010-07-09T23:25:07Z (14 years ago)
- Branches:
- master
- Children:
- f3b6764
- Parents:
- c5bff81 (diff), 9a9b520 (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
-
irc_im.c
rc5bff81 rb556e46 603 603 { 604 604 struct groupchat *c = ic->data; 605 char *trans = NULL, *s; 605 606 606 607 if( c == NULL ) 607 608 return FALSE; 608 else if( set_getbool( &ic->irc->b->set, "paste_buffer" ) ) 609 610 if( set_getbool( &ic->set, "translate_to_nicks" ) ) 611 { 612 char nick[MAX_NICK_LENGTH+1]; 613 irc_user_t *iu; 614 615 strncpy( nick, msg, MAX_NICK_LENGTH ); 616 nick[MAX_NICK_LENGTH] = '\0'; 617 if( ( s = strchr( nick, ':' ) ) || ( s = strchr( nick, ',' ) ) ) 618 { 619 *s = '\0'; 620 if( ( iu = irc_user_by_name( ic->irc, nick ) ) && 621 iu->bu->nick && irc_channel_has_user( ic, iu ) ) 622 { 623 trans = g_strconcat( iu->bu->nick, msg + ( s - nick ), NULL ); 624 msg = trans; 625 } 626 } 627 } 628 629 if( set_getbool( &ic->irc->b->set, "paste_buffer" ) ) 609 630 { 610 631 int delay; … … 623 644 ic->pastebuf_timer = b_timeout_add( delay, bee_irc_channel_chat_privmsg_cb, ic ); 624 645 646 g_free( trans ); 625 647 return TRUE; 626 648 } … … 628 650 bee_chat_msg( ic->irc->b, c, msg, 0 ); 629 651 652 g_free( trans ); 630 653 return TRUE; 631 654 } … … 747 770 set_add( &ic->set, "nick", NULL, NULL, ic ); 748 771 set_add( &ic->set, "room", NULL, NULL, ic ); 772 set_add( &ic->set, "translate_to_nicks", "true", set_eval_bool, ic ); 749 773 750 774 /* chat_type == groupchat */ … … 790 814 set_del( &ic->set, "nick" ); 791 815 set_del( &ic->set, "room" ); 816 set_del( &ic->set, "translate_to_nicks" ); 792 817 793 818 ic->flags &= ~IRC_CHANNEL_TEMP;
Note: See TracChangeset
for help on using the changeset viewer.