| 4542 if (report_idle && !(tmp & 0x400)) |
4542 if (report_idle && !(tmp & 0x400)) |
| 4543 aim_ssi_setpresence(sess, fr->conn, tmp | 0x400); |
4543 aim_ssi_setpresence(sess, fr->conn, tmp | 0x400); |
| 4544 } /* end adding buddies from local list to server list */ |
4544 } /* end adding buddies from local list to server list */ |
| 4545 |
4545 |
| 4546 { /* Check for maximum number of buddies */ |
4546 { /* Check for maximum number of buddies */ |
| 4547 GSList *groups = gaim_blist_groups(), *cur; |
4547 GaimBlistNode *gnode,*bnode; |
| 4548 for (cur=groups, tmp=0; cur; cur=g_slist_next(cur)) { |
4548 tmp = 0; |
| 4549 struct group* gr = (struct group*)cur->data; |
4549 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { |
| 4550 GSList *buds = gaim_blist_members(gr); |
4550 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) |
| 4551 GSList *buds1 = buds; |
4551 continue; |
| 4552 while(buds1) { |
4552 for(bnode = gnode->child; bnode; bnode = bnode->next) { |
| 4553 struct buddy *b = buds1->data; |
4553 struct buddy *b = (struct buddy *)bnode; |
| |
4554 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) |
| |
4555 continue; |
| 4554 if(b->account == gc->account) |
4556 if(b->account == gc->account) |
| 4555 tmp++; |
4557 tmp++; |
| 4556 buds1 = buds1->next; |
|
| 4557 } |
4558 } |
| 4558 g_slist_free(buds); |
4559 } |
| 4559 } |
|
| 4560 g_slist_free(groups); |
|
| 4561 |
4560 |
| 4562 if (tmp > od->rights.maxbuddies) { |
4561 if (tmp > od->rights.maxbuddies) { |
| 4563 char *dialog_msg = g_strdup_printf(_("The maximum number of buddies allowed in your buddy list is %d, and you have %d." |
4562 char *dialog_msg = g_strdup_printf(_("The maximum number of buddies allowed in your buddy list is %d, and you have %d." |
| 4564 " Until you are below the limit, some buddies will not show up as online."), |
4563 " Until you are below the limit, some buddies will not show up as online."), |
| 4565 od->rights.maxbuddies, tmp); |
4564 od->rights.maxbuddies, tmp); |
| 4566 do_error_dialog(_("Maximum buddy list length exceeded."), dialog_msg, GAIM_WARNING); |
4565 do_error_dialog(_("Maximum buddy list length exceeded."), dialog_msg, GAIM_WARNING); |
| 4567 g_free(dialog_msg); |
4566 g_free(dialog_msg); |
| 4568 } |
4567 } |
| 4569 } |
4568 } |
| 4570 |
4569 |
| 4571 /* Activate SSI */ |
4570 /* Activate SSI */ |
| 4572 /* Sending the enable causes other people to be able to see you, and you to see them */ |
4571 /* Sending the enable causes other people to be able to see you, and you to see them */ |
| 4573 /* Make sure your privacy setting/invisibility is set how you want it before this! */ |
4572 /* Make sure your privacy setting/invisibility is set how you want it before this! */ |
| 4574 debug_printf("ssi: activating server-stored buddy list\n"); |
4573 debug_printf("ssi: activating server-stored buddy list\n"); |
| 4575 aim_ssi_enable(sess); |
4574 aim_ssi_enable(sess); |
| 5415 |
5414 |
| 5416 static void oscar_show_awaitingauth(struct gaim_connection *gc) |
5415 static void oscar_show_awaitingauth(struct gaim_connection *gc) |
| 5417 { |
5416 { |
| 5418 struct oscar_data *od = gc->proto_data; |
5417 struct oscar_data *od = gc->proto_data; |
| 5419 gchar *nombre, *text, *tmp; |
5418 gchar *nombre, *text, *tmp; |
| 5420 GSList *curg = gaim_blist_groups(), *curg1; |
5419 GaimBlistNode *gnode,*bnode; |
| 5421 int num=0; |
5420 int num=0; |
| 5422 |
5421 |
| 5423 text = g_strdup(_("You are awaiting authorization from the following buddies:<BR>")); |
5422 text = g_strdup(_("You are awaiting authorization from the following buddies:<BR>")); |
| 5424 |
5423 |
| 5425 for (curg1 = curg; curg1; curg1=g_slist_next(curg1)) { |
5424 for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { |
| 5426 struct group *group = curg1->data; |
5425 struct group *group = (struct group *)gnode; |
| 5427 GSList *curb = gaim_blist_members(group), *curb1; |
5426 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) |
| 5428 for (curb1=curb; curb1; curb1=g_slist_next(curb1)) { |
5427 continue; |
| 5429 struct buddy *buddy = curb1->data; |
5428 for (bnode = gnode->child; bnode; bnode = bnode->next) { |
| |
5429 struct buddy *buddy = (struct buddy *)bnode; |
| |
5430 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) |
| |
5431 continue; |
| 5430 if (buddy->account == gc->account && aim_ssi_waitingforauth(od->sess->ssi.local, group->name, buddy->name)) { |
5432 if (buddy->account == gc->account && aim_ssi_waitingforauth(od->sess->ssi.local, group->name, buddy->name)) { |
| 5431 if (gaim_get_buddy_alias_only(buddy)) |
5433 if (gaim_get_buddy_alias_only(buddy)) |
| 5432 nombre = g_strdup_printf(" %s (%s)", buddy->name, gaim_get_buddy_alias_only(buddy)); |
5434 nombre = g_strdup_printf(" %s (%s)", buddy->name, gaim_get_buddy_alias_only(buddy)); |
| 5433 else |
5435 else |
| 5434 nombre = g_strdup_printf(" %s", buddy->name); |
5436 nombre = g_strdup_printf(" %s", buddy->name); |