Changes in protocols/nogaim.c [06045f6:9cb9868]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r06045f6 r9cb9868 162 162 return( NULL ); 163 163 } 164 165 /* Compare two handles for a specific protocol. For most protocols,166 g_strcasecmp is okay, but for AIM, for example, it's not. This really167 should be a compare function inside the PRPL module, but I do it this168 way for now because I don't want to touch the Gaim code too much since169 it's not going to be here for too long anymore. */170 int handle_cmp( char *a, char *b, int protocol )171 {172 if( protocol == PROTO_TOC || protocol == PROTO_ICQ )173 {174 /* AIM, being teh evil, thinks it's cool that users can put175 random spaces in screennames. But "A B" and "AB" are176 equal. Hrmm, okay. */177 while( 1 )178 {179 while( *a == ' ' ) a ++;180 while( *b == ' ' ) b ++;181 182 if( *a && *b )183 {184 if( tolower( *a ) != tolower( *b ) )185 return( 1 );186 }187 else if( *a || *b )188 return( 1 );189 else190 return( 0 );191 192 a ++;193 b ++;194 }195 }196 else197 {198 return( g_strcasecmp( a, b ) );199 }200 }201 202 164 203 165 /* multi.c */ … … 836 798 837 799 /* It might be yourself! */ 838 if( handle_cmp ( handle, b->gc->user->username, b->gc->protocol) == 0 )800 if( b->gc->prpl->cmp_buddynames( handle, b->gc->user->username ) == 0 ) 839 801 { 840 802 u = user_find( b->gc->irc, b->gc->irc->nick );
Note: See TracChangeset
for help on using the changeset viewer.