- Timestamp:
- 2006-10-15T09:41:12Z (18 years ago)
- Branches:
- master
- Children:
- 2529faf
- Parents:
- 695e392 (diff), e97827b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
user.c
r695e392 r69cb623 67 67 68 68 u->user = u->realname = u->host = u->nick = g_strdup( nick ); 69 u->is_private = set_get int( irc, "private" );69 u->is_private = set_getbool( &irc->set, "private" ); 70 70 71 71 key = g_strdup( nick ); … … 143 143 user_t *user_findhandle( struct gaim_connection *gc, char *handle ) 144 144 { 145 user_t *u = gc->irc->users; 146 147 while( u ) 148 { 149 if( u->gc == gc && u->handle && gc->prpl->cmp_buddynames ( u->handle, handle ) == 0 ) 150 break; 151 u = u->next; 152 } 153 154 return( u ); 145 user_t *u; 146 char *nick; 147 148 /* First, let's try a hash lookup. If it works, it's probably faster. */ 149 if( ( nick = g_hash_table_lookup( gc->acc->nicks, handle ) ) && 150 ( u = user_find( gc->irc, nick ) ) && 151 ( gc->acc->prpl->handle_cmp( handle, u->handle ) == 0 ) ) 152 return u; 153 154 /* However, it doesn't always work, so in that case we'll have to dig 155 through the whole userlist. :-( */ 156 for( u = gc->irc->users; u; u = u->next ) 157 if( u->gc == gc && u->handle && gc->acc->prpl->handle_cmp( u->handle, handle ) == 0 ) 158 return u; 159 160 return NULL; 155 161 } 156 162
Note: See TracChangeset
for help on using the changeset viewer.