diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/bee.h | 1 | ||||
| -rw-r--r-- | protocols/bee_user.c | 1 | ||||
| -rw-r--r-- | protocols/nogaim.c | 39 | 
3 files changed, 10 insertions, 31 deletions
| diff --git a/protocols/bee.h b/protocols/bee.h index 62c73e94..61604265 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -67,6 +67,7 @@ typedef struct bee_ui_funcs  {  	gboolean (*user_new)( bee_t *bee, struct bee_user *bu );  	gboolean (*user_free)( bee_t *bee, struct bee_user *bu ); +	gboolean (*user_fullname)( bee_t *bee, bee_user_t *bu );  	gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old );  	gboolean (*user_msg)( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at );  } bee_ui_funcs_t; diff --git a/protocols/bee_user.c b/protocols/bee_user.c index 675d37c5..20c760a9 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -168,7 +168,6 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags,  void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at )  {  	bee_t *bee = ic->bee; -	char *wrapped;  	bee_user_t *bu;  	bu = bee_user_by_handle( bee, ic, handle ); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 141ae9a3..1e00d5ab 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -364,7 +364,6 @@ void imcb_ask( struct im_connection *ic, char *msg, void *data,  void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )  {  	bee_user_t *bu; -	//char nick[MAX_NICK_LENGTH+1], *s;  	bee_t *bee = ic->bee;  	if( bee_user_by_handle( bee, ic, handle ) ) @@ -384,41 +383,21 @@ void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *g  	bu->group = g_strdup( group );  } -void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ) +void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *fullname )  { -#if 0 -	user_t *u = user_findhandle( ic, handle ); -	char *set; +	bee_t *bee = ic->bee; +	bee_user_t *bu = bee_user_by_handle( bee, ic, handle ); -	if( !u || !realname ) return; +	if( !bu || !fullname ) return; -	if( g_strcasecmp( u->realname, realname ) != 0 ) +	if( strcmp( bu->fullname, fullname ) != 0 )  	{ -		if( u->realname != u->nick ) g_free( u->realname ); -		 -		u->realname = g_strdup( realname ); +		g_free( bu->fullname ); +		bu->fullname = g_strdup( fullname ); -		if( ( ic->flags & OPT_LOGGED_IN ) && set_getbool( &ic->bee->set, "display_namechanges" ) ) -			imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname ); +		if( bee->ui->user_fullname ) +			bee->ui->user_fullname( bee, bu );  	} -	 -	set = set_getstr( &ic->acc->set, "nick_source" ); -	if( strcmp( set, "handle" ) != 0 ) -	{ -		char *name = g_strdup( realname ); -		 -		if( strcmp( set, "first_name" ) == 0 ) -		{ -			int i; -			for( i = 0; name[i] && !isspace( name[i] ); i ++ ) {} -			name[i] = '\0'; -		} -		 -		imcb_buddy_nick_hint( ic, handle, name ); -		 -		g_free( name ); -	} -#endif  }  void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group ) | 
