Changes in protocols/nogaim.c [9cb9868:06045f6]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r9cb9868 r06045f6 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 really 167 should be a compare function inside the PRPL module, but I do it this 168 way for now because I don't want to touch the Gaim code too much since 169 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 put 175 random spaces in screennames. But "A B" and "AB" are 176 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 else 190 return( 0 ); 191 192 a ++; 193 b ++; 194 } 195 } 196 else 197 { 198 return( g_strcasecmp( a, b ) ); 199 } 200 } 201 164 202 165 203 /* multi.c */ … … 798 836 799 837 /* It might be yourself! */ 800 if( b->gc->prpl->cmp_buddynames( handle, b->gc->user->username) == 0 )838 if( handle_cmp ( handle, b->gc->user->username, b->gc->protocol ) == 0 ) 801 839 { 802 840 u = user_find( b->gc->irc, b->gc->irc->nick );
Note: See TracChangeset
for help on using the changeset viewer.