src/protocols/msn/session.c

branch
soc.2006.msnp13
changeset 13856
a6511183749e
parent 13855
24cff9e060d7
child 13857
c890f17bf06d
equal deleted inserted replaced
13855:24cff9e060d7 13856:a6511183749e
41 session->userlist = msn_userlist_new(session); 41 session->userlist = msn_userlist_new(session);
42 42
43 session->user = msn_user_new(session->userlist, 43 session->user = msn_user_new(session->userlist,
44 gaim_account_get_username(account), NULL); 44 gaim_account_get_username(account), NULL);
45 45
46 /*if you want to chat with Yahoo Messenger*/
47 //session->protocol_ver = WLM_YAHOO_PROT_VER;
46 session->protocol_ver = WLM_PROT_VER; 48 session->protocol_ver = WLM_PROT_VER;
47 session->conv_seq = 1; 49 session->conv_seq = 1;
48 50
49 return session; 51 return session;
50 } 52 }
248 b = (GaimBuddy *)bnode; 250 b = (GaimBuddy *)bnode;
249 if(b->account == gc->account) { 251 if(b->account == gc->account) {
250 MsnUser *remote_user; 252 MsnUser *remote_user;
251 gboolean found = FALSE; 253 gboolean found = FALSE;
252 254
255 gaim_debug_info("MaYuan","buddy name:%s,group name:%s\n",b->name,group_name);
253 remote_user = msn_userlist_find_user(session->userlist, b->name); 256 remote_user = msn_userlist_find_user(session->userlist, b->name);
254 257
255 if ((remote_user != NULL) && (remote_user->list_op & MSN_LIST_FL_OP)){ 258 if ((remote_user != NULL) && (remote_user->list_op & MSN_LIST_FL_OP)){
256 int group_id; 259 char *group_id;
257 GList *l; 260 GList *l;
258 261
259 group_id = msn_userlist_find_group_id(remote_user->userlist, 262 group_id = msn_userlist_find_group_id(remote_user->userlist,
260 group_name); 263 group_name);
261 264
262 for (l = remote_user->group_ids; l != NULL; l = l->next){ 265 for (l = remote_user->group_ids; l != NULL; l = l->next){
263 if (group_id == GPOINTER_TO_INT(l->data)){ 266 if (!g_strcasecmp(group_id ,l->data)){
264 found = TRUE; 267 found = TRUE;
265 break; 268 break;
266 } 269 }
267 } 270 }
268
269 } 271 }
270 272
271 if (!found){ 273 if (!found){
272 /* The user was not on the server list or not in that group 274 /* The user was not on the server list or not in that group
273 * on the server list */ 275 * on the server list */

mercurial