| 1279 NMUserRecord *user_record = NULL; |
1279 NMUserRecord *user_record = NULL; |
| 1280 NMContact *contact = NULL; |
1280 NMContact *contact = NULL; |
| 1281 PurpleBuddy *buddy = NULL; |
1281 PurpleBuddy *buddy = NULL; |
| 1282 PurpleGroup *group; |
1282 PurpleGroup *group; |
| 1283 NMERR_T cnt = 0, i; |
1283 NMERR_T cnt = 0, i; |
| 1284 const char *text = NULL; |
|
| 1285 const char *name = NULL; |
1284 const char *name = NULL; |
| 1286 const char *fname = NULL; |
1285 const char *fname = NULL; |
| 1287 int status = 0; |
1286 int status = 0; |
| 1288 |
1287 |
| 1289 /* If this is the root folder give it a name. Purple does not have the concept of |
1288 /* If this is the root folder give it a name. Purple does not have the concept of |
| 1322 |
1321 |
| 1323 /* Set the initial status for the buddy */ |
1322 /* Set the initial status for the buddy */ |
| 1324 user_record = nm_contact_get_user_record(contact); |
1323 user_record = nm_contact_get_user_record(contact); |
| 1325 if (user_record) { |
1324 if (user_record) { |
| 1326 status = nm_user_record_get_status(user_record); |
1325 status = nm_user_record_get_status(user_record); |
| 1327 text = nm_user_record_get_status_text(user_record); |
|
| 1328 } |
1326 } |
| 1329 _update_buddy_status(user, buddy, status, time(0)); |
1327 _update_buddy_status(user, buddy, status, time(0)); |
| 1330 |
1328 |
| 1331 /* Save the new buddy as part of the contact object */ |
1329 /* Save the new buddy as part of the contact object */ |
| 1332 nm_contact_set_data(contact, (gpointer) buddy); |
1330 nm_contact_set_data(contact, (gpointer) buddy); |
| 3312 } |
3310 } |
| 3313 } |
3311 } |
| 3314 } |
3312 } |
| 3315 |
3313 |
| 3316 for (node = purple_connection_get_account(gc)->permit; node; node = node->next) { |
3314 for (node = purple_connection_get_account(gc)->permit; node; node = node->next) { |
| 3317 name = NULL; |
|
| 3318 dn = nm_lookup_dn(user, (char *)node->data); |
3315 dn = nm_lookup_dn(user, (char *)node->data); |
| 3319 if (dn) { |
3316 if (dn) { |
| 3320 user_record = nm_find_user_record(user, dn); |
|
| 3321 name = nm_user_record_get_display_id(user_record); |
|
| 3322 |
3317 |
| 3323 if (!g_slist_find_custom(user->allow_list, |
3318 if (!g_slist_find_custom(user->allow_list, |
| 3324 dn, (GCompareFunc)purple_utf8_strcasecmp)) { |
3319 dn, (GCompareFunc)purple_utf8_strcasecmp)) { |
| 3325 rc = nm_send_create_privacy_item(user, dn, TRUE, |
3320 rc = nm_send_create_privacy_item(user, dn, TRUE, |
| 3326 _create_privacy_item_deny_resp_cb, |
3321 _create_privacy_item_deny_resp_cb, |