comparison src/server.c @ 4969:21cfdb9af2eb

[gaim-migrate @ 5303] This fixes the renaming of groups on the sever-side. Thanks to The Nathan Walp for pointing it out. Thanks to The Sean for making a totally sweet buddy list. Thanks to Ethan for just being totally sweet in general. And thanks to Alf for trying to hard to eat cats. I also took out an unused function from oscar.c committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 03 Apr 2003 04:30:05 +0000
parents cb5bb2972a4b
children 088566495617
comparison
equal deleted inserted replaced
4968:804b25d09a5b 4969:21cfdb9af2eb
389 */ 389 */
390 void serv_rename_group(struct gaim_connection *g, struct group *old_group, const char *new_name) 390 void serv_rename_group(struct gaim_connection *g, struct group *old_group, const char *new_name)
391 { 391 {
392 if (g && g->prpl && old_group && new_name) { 392 if (g && g->prpl && old_group && new_name) {
393 GList *tobemoved = NULL; 393 GList *tobemoved = NULL;
394 GSList *original; 394 GaimBlistNode *b = ((GaimBlistNode*)old_group)->child;
395 395
396 /* for (original=old_group->members; original; original=g_slist_next(original)) { 396 while (b) {
397 struct buddy *b = original->data; 397 struct buddy *bd = (struct buddy *)b;
398 if(b->account == g->account) 398 if (bd->account = g->account)
399 tobemoved = g_list_append(tobemoved, b->name); 399 tobemoved = g_list_append(tobemoved, bd->name);
400 } */ 400 b = b->next;
401 }
401 402
402 if (g->prpl->rename_group) { 403 if (g->prpl->rename_group) {
403 /* prpl's might need to check if the group already 404 /* prpl's might need to check if the group already
404 * exists or not, and handle that differently */ 405 * exists or not, and handle that differently */
405 g->prpl->rename_group(g, old_group->name, new_name, tobemoved); 406 g->prpl->rename_group(g, old_group->name, new_name, tobemoved);