| 6699 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias)); |
6699 whoalias = gtk_entry_get_text(GTK_ENTRY(data->entry_for_alias)); |
| 6700 if (*whoalias == '\0') |
6700 if (*whoalias == '\0') |
| 6701 whoalias = NULL; |
6701 whoalias = NULL; |
| 6702 |
6702 |
| 6703 g = NULL; |
6703 g = NULL; |
| 6704 if ((grp != NULL) && (*grp != '\0') && ((g = purple_find_group(grp)) == NULL)) |
6704 if ((grp != NULL) && (*grp != '\0')) |
| 6705 { |
6705 { |
| 6706 g = purple_group_new(grp); |
6706 if ((g = purple_find_group(grp)) == NULL) |
| 6707 purple_blist_add_group(g, NULL); |
6707 { |
| 6708 } |
6708 g = purple_group_new(grp); |
| 6709 |
6709 purple_blist_add_group(g, NULL); |
| 6710 b = purple_buddy_new(data->account, who, whoalias); |
6710 } |
| 6711 purple_blist_add_buddy(b, NULL, g, NULL); |
6711 |
| |
6712 b = purple_find_buddy_in_group(data->account, who, g); |
| |
6713 } |
| |
6714 else if ((b = purple_find_buddy(data->account, who)) != NULL) |
| |
6715 { |
| |
6716 g = purple_buddy_get_group(b); |
| |
6717 } |
| |
6718 |
| |
6719 if (b == NULL) |
| |
6720 { |
| |
6721 b = purple_buddy_new(data->account, who, whoalias); |
| |
6722 purple_blist_add_buddy(b, NULL, g, NULL); |
| |
6723 } |
| |
6724 |
| 6712 purple_account_add_buddy(data->account, b); |
6725 purple_account_add_buddy(data->account, b); |
| 6713 |
6726 |
| 6714 /* Offer to merge people with the same alias. */ |
6727 /* Offer to merge people with the same alias. */ |
| 6715 if (whoalias != NULL && g != NULL) |
6728 if (whoalias != NULL && g != NULL) |
| 6716 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); |
6729 gtk_blist_auto_personize((PurpleBlistNode *)g, whoalias); |