diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2005-11-15 15:47:17 +0100 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2005-11-15 15:47:17 +0100 | 
| commit | 9cb9868256c51a45983aac894428230de6035d79 (patch) | |
| tree | dd2b57879e7b493a1de8ac1574a2e90250923e7d /protocols/nogaim.c | |
| parent | 9a103a2bdfb9a0afcc4d23e27d39c1a124194e18 (diff) | |
Remove handle_cmp() replacing it by a protocol-specific function.
Diffstat (limited to 'protocols/nogaim.c')
| -rw-r--r-- | protocols/nogaim.c | 40 | 
1 files changed, 1 insertions, 39 deletions
| diff --git a/protocols/nogaim.c b/protocols/nogaim.c index dee89a5e..65fc5a98 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -162,44 +162,6 @@ static char *proto_away_alias_find( GList *gcm, char *away )  	return( NULL );  } -/* Compare two handles for a specific protocol. For most protocols, -   g_strcasecmp is okay, but for AIM, for example, it's not. This really -   should be a compare function inside the PRPL module, but I do it this -   way for now because I don't want to touch the Gaim code too much since -   it's not going to be here for too long anymore. */ -int handle_cmp( char *a, char *b, int protocol ) -{ -	if( protocol == PROTO_TOC || protocol == PROTO_ICQ ) -	{ -		/* AIM, being teh evil, thinks it's cool that users can put -		   random spaces in screennames. But "A B" and "AB" are -		   equal. Hrmm, okay. */ -		while( 1 ) -		{ -			while( *a == ' ' ) a ++; -			while( *b == ' ' ) b ++; -			 -			if( *a && *b ) -			{ -				if( tolower( *a ) != tolower( *b ) ) -					return( 1 ); -			} -			else if( *a || *b ) -				return( 1 ); -			else -				return( 0 ); -			 -			a ++; -			b ++; -		} -	} -	else -	{ -		return( g_strcasecmp( a, b ) ); -	} -} - -  /* multi.c */  struct gaim_connection *new_gaim_conn( struct aim_user *user ) @@ -835,7 +797,7 @@ void add_chat_buddy( struct conversation *b, char *handle )  		irc_usermsg( b->gc->irc, "User %s added to conversation %d", handle, b->id );  	/* It might be yourself! */ -	if( handle_cmp ( handle, b->gc->user->username, b->gc->protocol ) == 0 ) +	if( b->gc->prpl->cmp_buddynames( handle, b->gc->user->username ) == 0 )  	{  		u = user_find( b->gc->irc, b->gc->irc->nick );  		if( !b->joined ) | 
