Changeset 9cb9868
- Timestamp:
- 2005-11-15T14:47:17Z (19 years ago)
- Branches:
- master
- Children:
- 5c09a59, c998255
- Parents:
- 9a103a2
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r9a103a2 r9cb9868 2441 2441 ret->alias_buddy = jabber_roster_update; 2442 2442 ret->group_buddy = jabber_group_change; 2443 ret->cmp_buddynames = g_strcasecmp; 2443 2444 2444 2445 my_protocol = ret; -
protocols/msn/msn.c
r9a103a2 r9cb9868 398 398 ret->rem_deny = msn_rem_deny; 399 399 ret->send_typing = msn_send_typing; 400 ret->cmp_buddynames = g_strcasecmp; 400 401 401 402 my_protocol = ret; -
protocols/nogaim.c
r9a103a2 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 ); -
protocols/nogaim.h
r9a103a2 r9cb9868 220 220 221 221 char *(* get_status_string) (struct gaim_connection *gc, int stat); 222 223 int (* cmp_buddynames) (const char *who1, const char *who2); 222 224 }; 223 225 … … 259 261 int proto_away( struct gaim_connection *gc, char *away ); 260 262 char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value ); 261 int handle_cmp( char *a, char *b, int protocol );262 263 263 264 gboolean auto_reconnect( gpointer data ); -
protocols/oscar/oscar.c
r9a103a2 r9cb9868 1210 1210 return 1; 1211 1211 } 1212 /* 1213 int handle_cmp_aim(const char * a, const char * b) { 1214 return handle_cmp(a, b, PROTO_TOC); 1215 } 1216 */ 1212 1217 1213 static int gaim_parse_incoming_im(aim_session_t *sess, aim_frame_t *fr, ...) { 1218 1214 int channel, ret = 0; … … 2486 2482 ret->set_permit_deny = oscar_set_permit_deny; 2487 2483 ret->keepalive = oscar_keepalive; 2484 ret->cmp_buddynames = aim_sncmp; 2488 2485 ret->get_status_string = oscar_get_status_string; 2489 2486 -
protocols/oscar/oscar_util.c
r9a103a2 r9cb9868 1 /*2 *3 *4 *5 */6 7 1 #include <aim.h> 8 2 #include <ctype.h> -
protocols/yahoo/yahoo.c
r9a103a2 r9cb9868 417 417 ret->chat_leave = byahoo_chat_leave; 418 418 ret->chat_open = byahoo_chat_open; 419 ret->cmp_buddynames = g_strcasecmp; 419 420 420 421 my_protocol = ret; -
user.c
r9a103a2 r9cb9868 146 146 while( u ) 147 147 { 148 if( u->gc == gc && u->handle && handle_cmp( u->handle, handle, gc->protocol) == 0 )148 if( u->gc == gc && u->handle && gc->prpl->cmp_buddynames ( u->handle, handle ) == 0 ) 149 149 break; 150 150 u = u->next;
Note: See TracChangeset
for help on using the changeset viewer.