Changeset 8b01217
- Timestamp:
- 2010-07-24T23:26:33Z (14 years ago)
- Branches:
- master
- Children:
- 42acba1
- Parents:
- f1f7b5e
- Location:
- protocols/msn
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rf1f7b5e r8b01217 199 199 static void msn_add_buddy( struct im_connection *ic, char *who, char *group ) 200 200 { 201 struct bee_user *bu = bee_user_by_handle( ic->bee, ic, who ); 202 201 203 msn_buddy_list_add( ic, "FL", who, who, group ); 204 if( bu && bu->group ) 205 msn_buddy_list_remove( ic, "FL", who, bu->group->name ); 202 206 } 203 207 204 208 static void msn_remove_buddy( struct im_connection *ic, char *who, char *group ) 205 209 { 206 msn_buddy_list_remove( ic, "FL", who );210 msn_buddy_list_remove( ic, "FL", who, NULL ); 207 211 } 208 212 … … 274 278 static void msn_rem_permit( struct im_connection *ic, char *who ) 275 279 { 276 msn_buddy_list_remove( ic, "AL", who );280 msn_buddy_list_remove( ic, "AL", who, NULL ); 277 281 } 278 282 … … 292 296 static void msn_rem_deny( struct im_connection *ic, char *who ) 293 297 { 294 msn_buddy_list_remove( ic, "BL", who );298 msn_buddy_list_remove( ic, "BL", who, NULL ); 295 299 } 296 300 -
protocols/msn/msn.h
rf1f7b5e r8b01217 167 167 int msn_logged_in( struct im_connection *ic ); 168 168 int msn_buddy_list_add( struct im_connection *ic, const char *list, const char *who, const char *realname_, const char *group ); 169 int msn_buddy_list_remove( struct im_connection *ic, char *list, c har *who);169 int msn_buddy_list_remove( struct im_connection *ic, char *list, const char *who, const char *group ); 170 170 void msn_buddy_ask( struct im_connection *ic, char *handle, char *realname ); 171 171 char *msn_findheader( char *text, char *header, int len ); -
protocols/msn/msn_util.c
rf1f7b5e r8b01217 109 109 } 110 110 111 int msn_buddy_list_remove( struct im_connection *ic, char *list, c har *who)111 int msn_buddy_list_remove( struct im_connection *ic, char *list, const char *who, const char *group ) 112 112 { 113 113 struct msn_data *md = ic->proto_data; 114 char buf[1024]; 115 116 g_snprintf( buf, sizeof( buf ), "REM %d %s %s\r\n", ++md->trId, list, who ); 114 char buf[1024], groupid[8]; 115 116 *groupid = '\0'; 117 if( group ) 118 { 119 int i; 120 for( i = 0; i < md->groupcount; i ++ ) 121 if( g_strcasecmp( md->grouplist[i], group ) == 0 ) 122 { 123 g_snprintf( groupid, sizeof( groupid ), " %d", i ); 124 break; 125 } 126 } 127 128 g_snprintf( buf, sizeof( buf ), "REM %d %s %s%s\r\n", ++md->trId, list, who, groupid ); 117 129 if( msn_write( ic, buf, strlen( buf ) ) ) 118 130 return( 1 );
Note: See TracChangeset
for help on using the changeset viewer.