Changes in / [b556e46:c5bff81]
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
rb556e46 rc5bff81 372 372 /* Try to save data for all active connections (if desired). */ 373 373 while( irc_connection_list != NULL ) 374 irc_abort( irc_connection_list->data, FALSE, 375 "BitlBee server shutting down" ); 374 irc_free( irc_connection_list->data ); 376 375 377 376 /* We'll only reach this point when not running in inetd mode: */ -
doc/user-guide/commands.xml
rb556e46 rc5bff81 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 1109 1095 <bitlbee-setting name="type" type="string" scope="channel"> 1110 1096 <default>control</default> -
irc_commands.c
rb556e46 rc5bff81 72 72 static void irc_cmd_nick( irc_t *irc, char **cmd ) 73 73 { 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] ); 74 if( irc_user_by_name( irc, cmd[1] ) ) 75 { 76 irc_send_num( irc, 433, ":This nick is already in use" ); 79 77 } 80 78 else if( !nick_ok( cmd[1] ) ) 81 79 { 82 80 /* [SH] Invalid characters. */ 83 irc_send_num( irc, 432, " %s :This nick contains invalid characters", cmd[1]);84 } 85 else if( irc-> status & USTATUS_LOGGED_IN)81 irc_send_num( irc, 432, ":This nick contains invalid characters" ); 82 } 83 else if( irc->user->nick ) 86 84 { 87 85 if( irc->status & USTATUS_IDENTIFIED ) … … 100 98 else 101 99 { 102 g_free( irc->user->nick );103 100 irc->user->nick = g_strdup( cmd[1] ); 104 101 -
irc_im.c
rb556e46 rc5bff81 603 603 { 604 604 struct groupchat *c = ic->data; 605 char *trans = NULL, *s;606 605 607 606 if( c == NULL ) 608 607 return FALSE; 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" ) ) 608 else if( set_getbool( &ic->irc->b->set, "paste_buffer" ) ) 630 609 { 631 610 int delay; … … 644 623 ic->pastebuf_timer = b_timeout_add( delay, bee_irc_channel_chat_privmsg_cb, ic ); 645 624 646 g_free( trans );647 625 return TRUE; 648 626 } … … 650 628 bee_chat_msg( ic->irc->b, c, msg, 0 ); 651 629 652 g_free( trans );653 630 return TRUE; 654 631 } … … 770 747 set_add( &ic->set, "nick", NULL, NULL, ic ); 771 748 set_add( &ic->set, "room", NULL, NULL, ic ); 772 set_add( &ic->set, "translate_to_nicks", "true", set_eval_bool, ic );773 749 774 750 /* chat_type == groupchat */ … … 814 790 set_del( &ic->set, "nick" ); 815 791 set_del( &ic->set, "room" ); 816 set_del( &ic->set, "translate_to_nicks" );817 792 818 793 ic->flags &= ~IRC_CHANNEL_TEMP; -
irc_user.c
rb556e46 rc5bff81 121 121 { 122 122 irc_t *irc = iu->irc; 123 irc_user_t *new_iu;124 123 char key[strlen(new)+1]; 125 124 GSList *cl; 126 125 127 126 strcpy( key, new ); 128 if( iu == NULL || !nick_lc( key ) || 129 ( ( new_iu = irc_user_by_name( irc, new ) ) && new_iu != iu ) ) 127 if( iu == NULL || !nick_lc( key ) || irc_user_by_name( irc, new ) ) 130 128 return 0; 131 129 -
protocols/bee.h
rb556e46 rc5bff81 62 62 char *handle; 63 63 char *fullname; 64 char *nick;65 64 struct bee_group *group; 66 65 -
protocols/bee_user.c
rb556e46 rc5bff81 60 60 g_free( bu->handle ); 61 61 g_free( bu->fullname ); 62 g_free( bu->nick );63 62 g_free( bu->status ); 64 63 g_free( bu->status_msg ); -
protocols/nogaim.c
rb556e46 rc5bff81 427 427 428 428 if( !bu || !nick ) return; 429 430 g_free( bu->nick );431 bu->nick = g_strdup( nick );432 429 433 430 if( bee->ui->user_nick_hint ) -
root_commands.c
rb556e46 rc5bff81 680 680 static void cmd_rename( irc_t *irc, char **cmd ) 681 681 { 682 irc_user_t *iu , *old;682 irc_user_t *iu; 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( ( old = irc_user_by_name( irc, cmd[2] ) ) && old != iu)698 else if( irc_user_by_name( irc, cmd[2] ) ) 699 699 { 700 700 irc_usermsg( irc, "Nick `%s' already exists", cmd[2] );
Note: See TracChangeset
for help on using the changeset viewer.