comparison src/list.c @ 4950:e81625009ab3

[gaim-migrate @ 5284] Fixed parse_toc_buddy_list committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Tue, 01 Apr 2003 17:27:58 +0000
parents 6a0b1eb407e5
children decdf19454ab
comparison
equal deleted inserted replaced
4949:e8c0b116a9a3 4950:e81625009ab3
536 536
537 if (!gaim_find_buddy(account, nm)) { 537 if (!gaim_find_buddy(account, nm)) {
538 struct buddy *b = gaim_buddy_new(account, nm, sw); 538 struct buddy *b = gaim_buddy_new(account, nm, sw);
539 struct group *g = gaim_find_group(current); 539 struct group *g = gaim_find_group(current);
540 gaim_blist_add_buddy(b, g, NULL); 540 gaim_blist_add_buddy(b, g, NULL);
541 bud = g_list_append(bud, nm); 541 bud = g_list_append(bud, g_strdup(nm));
542 } 542 }
543 } else if (*c == 'p') { 543 } else if (*c == 'p') {
544 gaim_privacy_permit_add(account, c + 2); 544 gaim_privacy_permit_add(account, c + 2);
545 } else if (*c == 'd') { 545 } else if (*c == 'd') {
546 gaim_privacy_deny_add(account, c + 2); 546 gaim_privacy_deny_add(account, c + 2);
556 account->permdeny = 1; 556 account->permdeny = 1;
557 } 557 }
558 } while ((c = strtok(NULL, "\n"))); 558 } while ((c = strtok(NULL, "\n")));
559 559
560 if(account->gc) { 560 if(account->gc) {
561 if(bud) 561 if(bud) {
562 GList *node = bud;
562 serv_add_buddies(account->gc, bud); 563 serv_add_buddies(account->gc, bud);
564 while(node) {
565 g_free(node->data);
566 node = node->next;
567 }
568 }
563 serv_set_permit_deny(account->gc); 569 serv_set_permit_deny(account->gc);
564 } 570 }
565 g_list_free(bud); 571 g_list_free(bud);
566 } 572 }
567 } 573 }