- Timestamp:
- 2010-06-09T00:35:13Z (14 years ago)
- Branches:
- master
- Children:
- 95c3ea9
- Parents:
- 46d215d
- Location:
- protocols/msn
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
r46d215d r6acc033 182 182 static void msn_add_buddy( struct im_connection *ic, char *who, char *group ) 183 183 { 184 msn_buddy_list_add( ic, "FL", who, who );184 msn_buddy_list_add( ic, "FL", who, who, group ); 185 185 } 186 186 … … 252 252 static void msn_add_permit( struct im_connection *ic, char *who ) 253 253 { 254 msn_buddy_list_add( ic, "AL", who, who );254 msn_buddy_list_add( ic, "AL", who, who, NULL ); 255 255 } 256 256 … … 264 264 struct msn_switchboard *sb; 265 265 266 msn_buddy_list_add( ic, "BL", who, who );266 msn_buddy_list_add( ic, "BL", who, who, NULL ); 267 267 268 268 /* If there's still a conversation with this person, close it. */ -
protocols/msn/msn.h
r46d215d r6acc033 160 160 int msn_write( struct im_connection *ic, char *s, int len ); 161 161 int msn_logged_in( struct im_connection *ic ); 162 int msn_buddy_list_add( struct im_connection *ic, c har *list, char *who, char *realname);162 int msn_buddy_list_add( struct im_connection *ic, const char *list, const char *who, const char *realname_, const char *group ); 163 163 int msn_buddy_list_remove( struct im_connection *ic, char *list, char *who ); 164 164 void msn_buddy_ask( struct im_connection *ic, char *handle, char *realname ); -
protocols/msn/msn_util.c
r46d215d r6acc033 51 51 } 52 52 53 int msn_buddy_list_add( struct im_connection *ic, c har *list, char *who, char *realname_)53 int msn_buddy_list_add( struct im_connection *ic, const char *list, const char *who, const char *realname_, const char *group ) 54 54 { 55 55 struct msn_data *md = ic->proto_data; 56 char buf[1024], *realname ;56 char buf[1024], *realname, groupid[8]; 57 57 58 58 realname = msn_http_encode( realname_ ); 59 59 60 g_snprintf( buf, sizeof( buf ), "ADD %d %s %s %s\r\n", ++md->trId, list, who, realname ); 60 *groupid = '\0'; 61 if( group ) 62 { 63 int i; 64 for( i = 0; i < md->groupcount; i ++ ) 65 if( g_strcasecmp( md->grouplist[i], group ) == 0 ) 66 { 67 g_snprintf( groupid, sizeof( groupid ), " %d", i ); 68 break; 69 } 70 } 71 72 g_snprintf( buf, sizeof( buf ), "ADD %d %s %s %s%s\r\n", ++md->trId, list, who, realname, groupid ); 61 73 if( msn_write( ic, buf, strlen( buf ) ) ) 62 74 { … … 94 106 struct msn_buddy_ask_data *bla = data; 95 107 96 msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname );108 msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname, NULL ); 97 109 98 110 imcb_ask_add( bla->ic, bla->handle, NULL ); … … 107 119 struct msn_buddy_ask_data *bla = data; 108 120 109 msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname );121 msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname, NULL ); 110 122 111 123 g_free( bla->handle ); -
protocols/msn/ns.c
r46d215d r6acc033 533 533 else if( num_parts >= 6 && strcmp( cmd[2], "FL" ) == 0 ) 534 534 { 535 const char *group = NULL; 536 int num; 537 538 if( cmd[6] != NULL && sscanf( cmd[6], "%d", &num ) == 1 && num < md->groupcount ) 539 group = md->grouplist[num]; 540 535 541 http_decode( cmd[5] ); 536 imcb_add_buddy( ic, cmd[4], NULL);542 imcb_add_buddy( ic, cmd[4], group ); 537 543 imcb_rename_buddy( ic, cmd[4], cmd[5] ); 538 544 }
Note: See TracChangeset
for help on using the changeset viewer.