Index: bitlbee.c
===================================================================
--- bitlbee.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ bitlbee.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -372,6 +372,5 @@
/* Try to save data for all active connections (if desired). */
while( irc_connection_list != NULL )
- irc_abort( irc_connection_list->data, FALSE,
- "BitlBee server shutting down" );
+ irc_free( irc_connection_list->data );
/* We'll only reach this point when not running in inetd mode: */
Index: doc/user-guide/commands.xml
===================================================================
--- doc/user-guide/commands.xml (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ doc/user-guide/commands.xml (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -1093,18 +1093,4 @@
-
- true
-
-
-
- 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.
-
-
-
- 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.
-
-
-
-
control
Index: irc_commands.c
===================================================================
--- irc_commands.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ irc_commands.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -72,16 +72,14 @@
static void irc_cmd_nick( irc_t *irc, char **cmd )
{
- irc_user_t *iu;
-
- if( ( iu = irc_user_by_name( irc, cmd[1] ) ) && iu != irc->user )
- {
- irc_send_num( irc, 433, "%s :This nick is already in use", cmd[1] );
+ if( irc_user_by_name( irc, cmd[1] ) )
+ {
+ irc_send_num( irc, 433, ":This nick is already in use" );
}
else if( !nick_ok( cmd[1] ) )
{
/* [SH] Invalid characters. */
- irc_send_num( irc, 432, "%s :This nick contains invalid characters", cmd[1] );
- }
- else if( irc->status & USTATUS_LOGGED_IN )
+ irc_send_num( irc, 432, ":This nick contains invalid characters" );
+ }
+ else if( irc->user->nick )
{
if( irc->status & USTATUS_IDENTIFIED )
@@ -100,5 +98,4 @@
else
{
- g_free( irc->user->nick );
irc->user->nick = g_strdup( cmd[1] );
Index: irc_im.c
===================================================================
--- irc_im.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ irc_im.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -603,29 +603,8 @@
{
struct groupchat *c = ic->data;
- char *trans = NULL, *s;
if( c == NULL )
return FALSE;
-
- if( set_getbool( &ic->set, "translate_to_nicks" ) )
- {
- char nick[MAX_NICK_LENGTH+1];
- irc_user_t *iu;
-
- strncpy( nick, msg, MAX_NICK_LENGTH );
- nick[MAX_NICK_LENGTH] = '\0';
- if( ( s = strchr( nick, ':' ) ) || ( s = strchr( nick, ',' ) ) )
- {
- *s = '\0';
- if( ( iu = irc_user_by_name( ic->irc, nick ) ) &&
- iu->bu->nick && irc_channel_has_user( ic, iu ) )
- {
- trans = g_strconcat( iu->bu->nick, msg + ( s - nick ), NULL );
- msg = trans;
- }
- }
- }
-
- if( set_getbool( &ic->irc->b->set, "paste_buffer" ) )
+ else if( set_getbool( &ic->irc->b->set, "paste_buffer" ) )
{
int delay;
@@ -644,5 +623,4 @@
ic->pastebuf_timer = b_timeout_add( delay, bee_irc_channel_chat_privmsg_cb, ic );
- g_free( trans );
return TRUE;
}
@@ -650,5 +628,4 @@
bee_chat_msg( ic->irc->b, c, msg, 0 );
- g_free( trans );
return TRUE;
}
@@ -770,5 +747,4 @@
set_add( &ic->set, "nick", NULL, NULL, ic );
set_add( &ic->set, "room", NULL, NULL, ic );
- set_add( &ic->set, "translate_to_nicks", "true", set_eval_bool, ic );
/* chat_type == groupchat */
@@ -814,5 +790,4 @@
set_del( &ic->set, "nick" );
set_del( &ic->set, "room" );
- set_del( &ic->set, "translate_to_nicks" );
ic->flags &= ~IRC_CHANNEL_TEMP;
Index: irc_user.c
===================================================================
--- irc_user.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ irc_user.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -121,11 +121,9 @@
{
irc_t *irc = iu->irc;
- irc_user_t *new_iu;
char key[strlen(new)+1];
GSList *cl;
strcpy( key, new );
- if( iu == NULL || !nick_lc( key ) ||
- ( ( new_iu = irc_user_by_name( irc, new ) ) && new_iu != iu ) )
+ if( iu == NULL || !nick_lc( key ) || irc_user_by_name( irc, new ) )
return 0;
Index: protocols/bee.h
===================================================================
--- protocols/bee.h (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ protocols/bee.h (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -62,5 +62,4 @@
char *handle;
char *fullname;
- char *nick;
struct bee_group *group;
Index: protocols/bee_user.c
===================================================================
--- protocols/bee_user.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ protocols/bee_user.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -60,5 +60,4 @@
g_free( bu->handle );
g_free( bu->fullname );
- g_free( bu->nick );
g_free( bu->status );
g_free( bu->status_msg );
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ protocols/nogaim.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -427,7 +427,4 @@
if( !bu || !nick ) return;
-
- g_free( bu->nick );
- bu->nick = g_strdup( nick );
if( bee->ui->user_nick_hint )
Index: root_commands.c
===================================================================
--- root_commands.c (revision b556e46f9bfeeb630b45a3c0f0951110ac3de0f2)
+++ root_commands.c (revision c5bff810e6919dc3daf7f82f761197a27f04538b)
@@ -680,5 +680,5 @@
static void cmd_rename( irc_t *irc, char **cmd )
{
- irc_user_t *iu, *old;
+ irc_user_t *iu;
iu = irc_user_by_name( irc, cmd[1] );
@@ -696,5 +696,5 @@
irc_usermsg( irc, "Nick `%s' is invalid", cmd[2] );
}
- else if( ( old = irc_user_by_name( irc, cmd[2] ) ) && old != iu )
+ else if( irc_user_by_name( irc, cmd[2] ) )
{
irc_usermsg( irc, "Nick `%s' already exists", cmd[2] );