comparison src/protocols/msn/notification.c @ 10044:86a6d78b070b

[gaim-migrate @ 11003] this is the msn buddy list sync code from the 1.0.0 tree, also from shx. in this patch, i changed one instance of "b" to "buddy" to make it compile. this introduces code to ask the user about discrepances between the local and server lists on msn. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 19 Sep 2004 03:02:28 +0000
parents 700f8fb9e581
children 5d2a08d82e7a
comparison
equal deleted inserted replaced
10043:700f8fb9e581 10044:86a6d78b070b
315 315
316 user = msn_userlist_find_user(session->userlist, passport); 316 user = msn_userlist_find_user(session->userlist, passport);
317 317
318 if (user == NULL) 318 if (user == NULL)
319 { 319 {
320 gaim_debug_info("msn", "Creating new user. '%s' was not found.\n",
321 passport);
322 user = msn_user_new(session->userlist, passport, friendly); 320 user = msn_user_new(session->userlist, passport, friendly);
323 msn_userlist_add_user(session->userlist, user); 321 msn_userlist_add_user(session->userlist, user);
324 } 322 }
325 else 323 else
326 msn_user_set_friendly_name(user, friendly); 324 msn_user_set_friendly_name(user, friendly);
407 405
408 g_free(reason); 406 g_free(reason);
409 407
410 g_strfreev(params); 408 g_strfreev(params);
411 } 409 }
412
413 410
414 static void 411 static void
415 adg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) 412 adg_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
416 { 413 {
417 MsnGroup *group; 414 MsnGroup *group;
709 706
710 static void 707 static void
711 syn_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) 708 syn_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
712 { 709 {
713 MsnSession *session; 710 MsnSession *session;
714 GaimConnection *gc;
715 int total_users; 711 int total_users;
716 712
717 session = cmdproc->session; 713 session = cmdproc->session;
718 gc = gaim_account_get_connection(session->account);
719 total_users = atoi(cmd->params[2]); 714 total_users = atoi(cmd->params[2]);
720 715
721 if (total_users == 0) 716 if (total_users == 0)
722 { 717 {
723 gaim_connection_set_state(gc, GAIM_CONNECTED); 718 msn_session_finish_login(session);
724 session->logged_in = TRUE;
725
726 serv_finish_login(gc);
727 } 719 }
728 else 720 else
729 { 721 {
730 /* syn_table */ 722 /* syn_table */
731 MsnSync *sync; 723 MsnSync *sync;