Changeset b556e46
- 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. - Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
rc5bff81 rb556e46 372 372 /* Try to save data for all active connections (if desired). */ 373 373 while( irc_connection_list != NULL ) 374 irc_free( irc_connection_list->data ); 374 irc_abort( irc_connection_list->data, FALSE, 375 "BitlBee server shutting down" ); 375 376 376 377 /* We'll only reach this point when not running in inetd mode: */ -
doc/user-guide/commands.xml
rc5bff81 rb556e46 1093 1093 </bitlbee-setting> 1094 1094 1095 <bitlbee-setting name="translate_to_nicks" type="boolean" scope="channel"> 1096 <default>true</default> 1097 1098 <description> 1099 <para> 1100 IRC's nickname namespace is quite limited compared to most IM protocols. Not any non-ASCII characters are allowed, in fact nicknames have to be mostly alpha-numeric. Also, BitlBee has to add underscores sometimes to avoid nickname collisions. 1101 </para> 1102 1103 <para> 1104 While normally the BitlBee user is the only one seeing these names, they may be exposed to other chatroom participants for example when addressing someone in the channel (with or without tab completion). By default BitlBee will translate these stripped nicknames back to the original nick. If you don't want this, disable this setting. 1105 </para> 1106 </description> 1107 </bitlbee-setting> 1108 1095 1109 <bitlbee-setting name="type" type="string" scope="channel"> 1096 1110 <default>control</default> -
irc_commands.c
rc5bff81 rb556e46 72 72 static void irc_cmd_nick( irc_t *irc, char **cmd ) 73 73 { 74 if( irc_user_by_name( irc, cmd[1] ) ) 75 { 76 irc_send_num( irc, 433, ":This nick is already in use" ); 74 irc_user_t *iu; 75 76 if( ( iu = irc_user_by_name( irc, cmd[1] ) ) && iu != irc->user ) 77 { 78 irc_send_num( irc, 433, "%s :This nick is already in use", cmd[1] ); 77 79 } 78 80 else if( !nick_ok( cmd[1] ) ) 79 81 { 80 82 /* [SH] Invalid characters. */ 81 irc_send_num( irc, 432, " :This nick contains invalid characters");82 } 83 else if( irc-> user->nick)83 irc_send_num( irc, 432, "%s :This nick contains invalid characters", cmd[1] ); 84 } 85 else if( irc->status & USTATUS_LOGGED_IN ) 84 86 { 85 87 if( irc->status & USTATUS_IDENTIFIED ) … … 98 100 else 99 101 { 102 g_free( irc->user->nick ); 100 103 irc->user->nick = g_strdup( cmd[1] ); 101 104 -
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; -
irc_user.c
rc5bff81 rb556e46 121 121 { 122 122 irc_t *irc = iu->irc; 123 irc_user_t *new_iu; 123 124 char key[strlen(new)+1]; 124 125 GSList *cl; 125 126 126 127 strcpy( key, new ); 127 if( iu == NULL || !nick_lc( key ) || irc_user_by_name( irc, new ) ) 128 if( iu == NULL || !nick_lc( key ) || 129 ( ( new_iu = irc_user_by_name( irc, new ) ) && new_iu != iu ) ) 128 130 return 0; 129 131 -
protocols/bee.h
rc5bff81 rb556e46 62 62 char *handle; 63 63 char *fullname; 64 char *nick; 64 65 struct bee_group *group; 65 66 -
protocols/bee_user.c
rc5bff81 rb556e46 60 60 g_free( bu->handle ); 61 61 g_free( bu->fullname ); 62 g_free( bu->nick ); 62 63 g_free( bu->status ); 63 64 g_free( bu->status_msg ); -
protocols/nogaim.c
rc5bff81 rb556e46 427 427 428 428 if( !bu || !nick ) return; 429 430 g_free( bu->nick ); 431 bu->nick = g_strdup( nick ); 429 432 430 433 if( bee->ui->user_nick_hint ) -
root_commands.c
rc5bff81 rb556e46 680 680 static void cmd_rename( irc_t *irc, char **cmd ) 681 681 { 682 irc_user_t *iu ;682 irc_user_t *iu, *old; 683 683 684 684 iu = irc_user_by_name( irc, cmd[1] ); … … 696 696 irc_usermsg( irc, "Nick `%s' is invalid", cmd[2] ); 697 697 } 698 else if( irc_user_by_name( irc, cmd[2] ))698 else if( ( old = irc_user_by_name( irc, cmd[2] ) ) && old != iu ) 699 699 { 700 700 irc_usermsg( irc, "Nick `%s' already exists", cmd[2] );
Note: See TracChangeset
for help on using the changeset viewer.