| 475 /* We can't join */ |
475 /* We can't join */ |
| 476 struct yahoo_pair *pair = pkt->hash->data; |
476 struct yahoo_pair *pair = pkt->hash->data; |
| 477 gchar const *failed_to_join = _("Failed to join chat"); |
477 gchar const *failed_to_join = _("Failed to join chat"); |
| 478 switch (atoi(pair->value)) { |
478 switch (atoi(pair->value)) { |
| 479 case 0xFFFFFFFA: /* -6 */ |
479 case 0xFFFFFFFA: /* -6 */ |
| 480 purple_notify_error(gc, NULL, failed_to_join, _("Unknown room")); |
480 purple_notify_error(gc, NULL, failed_to_join, |
| |
481 _("Unknown room"), |
| |
482 purple_request_cpar_from_connection(gc)); |
| 481 break; |
483 break; |
| 482 case 0xFFFFFFF1: /* -15 */ |
484 case 0xFFFFFFF1: /* -15 */ |
| 483 purple_notify_error(gc, NULL, failed_to_join, _("Maybe the room is full")); |
485 purple_notify_error(gc, NULL, failed_to_join, |
| |
486 _("Maybe the room is full"), |
| |
487 purple_request_cpar_from_connection(gc)); |
| 484 break; |
488 break; |
| 485 case 0xFFFFFFDD: /* -35 */ |
489 case 0xFFFFFFDD: /* -35 */ |
| 486 purple_notify_error(gc, NULL, failed_to_join, _("Not available")); |
490 purple_notify_error(gc, NULL, failed_to_join, |
| |
491 _("Not available"), |
| |
492 purple_request_cpar_from_connection(gc)); |
| 487 break; |
493 break; |
| 488 default: |
494 default: |
| 489 purple_notify_error(gc, NULL, failed_to_join, |
495 purple_notify_error(gc, NULL, failed_to_join, |
| 490 _("Unknown error. You may need to logout and wait five minutes before being able to rejoin a chatroom")); |
496 _("Unknown error. You may need to " |
| |
497 "logout and wait five minutes before " |
| |
498 "being able to rejoin a chatroom"), |
| |
499 purple_request_cpar_from_connection(gc)); |
| 491 } |
500 } |
| 492 return; |
501 return; |
| 493 } |
502 } |
| 494 |
503 |
| 495 for (l = pkt->hash; l; l = l->next) { |
504 for (l = pkt->hash; l; l = l->next) { |
| 749 g_free(msg); |
758 g_free(msg); |
| 750 } |
759 } |
| 751 |
760 |
| 752 void yahoo_process_chat_goto(PurpleConnection *gc, struct yahoo_packet *pkt) |
761 void yahoo_process_chat_goto(PurpleConnection *gc, struct yahoo_packet *pkt) |
| 753 { |
762 { |
| 754 if (pkt->status == -1) |
763 if (pkt->status == -1) { |
| 755 purple_notify_error(gc, NULL, _("Failed to join buddy in chat"), |
764 purple_notify_error(gc, NULL, _("Failed to join buddy in chat"), |
| 756 _("Maybe they're not in a chat?")); |
765 _("Maybe they're not in a chat?"), |
| |
766 purple_request_cpar_from_connection(gc)); |
| |
767 } |
| 757 } |
768 } |
| 758 |
769 |
| 759 /* |
770 /* |
| 760 * Functions dealing with conferences |
771 * Functions dealing with conferences |
| 761 * I think conference names are always ascii. |
772 * I think conference names are always ascii. |
| 1384 gc = purple_account_get_connection(purple_roomlist_get_account( |
1395 gc = purple_account_get_connection(purple_roomlist_get_account( |
| 1385 yrl->list)); |
1396 yrl->list)); |
| 1386 |
1397 |
| 1387 if (!purple_http_response_is_successful(response)) { |
1398 if (!purple_http_response_is_successful(response)) { |
| 1388 purple_notify_error(gc, NULL, _("Unable to connect"), |
1399 purple_notify_error(gc, NULL, _("Unable to connect"), |
| 1389 _("Fetching the room list failed.")); |
1400 _("Fetching the room list failed."), |
| |
1401 purple_request_cpar_from_connection(gc)); |
| 1390 yahoo_roomlist_cleanup(yrl->list, yrl); |
1402 yahoo_roomlist_cleanup(yrl->list, yrl); |
| 1391 return; |
1403 return; |
| 1392 } |
1404 } |
| 1393 |
1405 |
| 1394 parse = g_markup_parse_context_new(&parser, 0, |
1406 parse = g_markup_parse_context_new(&parser, 0, |