Mercurial > pidgin.yaz
comparison src/protocols/msn/msn.c @ 6378:01289157fc37
[gaim-migrate @ 6883]
This solves the problem of 50 billion dialogs on your screen and server
requests to re-authorize or re-deny everybody on every privacy list in your
protocol. "Oops."
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 05 Aug 2003 18:59:57 +0000 |
parents | 8f94cce8faa5 |
children | 7c14b35bc984 |
comparison
equal
deleted
inserted
replaced
6377:8cbf38789734 | 6378:01289157fc37 |
---|---|
697 _("An MSN screenname must be in the form \"user@server.com\". " | 697 _("An MSN screenname must be in the form \"user@server.com\". " |
698 "Perhaps you meant %s@hotmail.com. No changes were made " | 698 "Perhaps you meant %s@hotmail.com. No changes were made " |
699 "to your allow list."), who); | 699 "to your allow list."), who); |
700 | 700 |
701 gaim_notify_error(gc, NULL, _("Invalid MSN screenname"), buf); | 701 gaim_notify_error(gc, NULL, _("Invalid MSN screenname"), buf); |
702 gaim_privacy_permit_remove(gc->account, who); | 702 gaim_privacy_permit_remove(gc->account, who, TRUE); |
703 | 703 |
704 return; | 704 return; |
705 } | 705 } |
706 | 706 |
707 if (g_slist_find_custom(gc->account->deny, who, (GCompareFunc)strcmp)) { | 707 if (g_slist_find_custom(gc->account->deny, who, (GCompareFunc)strcmp)) { |
708 gaim_debug(GAIM_DEBUG_INFO, "msn", "Moving %s from BL to AL\n", who); | 708 gaim_debug(GAIM_DEBUG_INFO, "msn", "Moving %s from BL to AL\n", who); |
709 gaim_privacy_deny_remove(gc->account, who); | 709 gaim_privacy_deny_remove(gc->account, who, TRUE); |
710 | 710 |
711 g_snprintf(buf, sizeof(buf), "BL %s", who); | 711 g_snprintf(buf, sizeof(buf), "BL %s", who); |
712 | 712 |
713 if (!msn_servconn_send_command(session->notification_conn, | 713 if (!msn_servconn_send_command(session->notification_conn, |
714 "REM", buf)) { | 714 "REM", buf)) { |
738 "Perhaps you meant %s@hotmail.com. No changes were made " | 738 "Perhaps you meant %s@hotmail.com. No changes were made " |
739 "to your block list."), who); | 739 "to your block list."), who); |
740 | 740 |
741 gaim_notify_error(gc, NULL, _("Invalid MSN screenname"), buf); | 741 gaim_notify_error(gc, NULL, _("Invalid MSN screenname"), buf); |
742 | 742 |
743 gaim_privacy_deny_remove(gc->account, who); | 743 gaim_privacy_deny_remove(gc->account, who, TRUE); |
744 | 744 |
745 return; | 745 return; |
746 } | 746 } |
747 | 747 |
748 if (g_slist_find_custom(gc->account->permit, who, (GCompareFunc)strcmp)) { | 748 if (g_slist_find_custom(gc->account->permit, who, (GCompareFunc)strcmp)) { |
749 gaim_debug(GAIM_DEBUG_INFO, "msn", "Moving %s from AL to BL\n", who); | 749 gaim_debug(GAIM_DEBUG_INFO, "msn", "Moving %s from AL to BL\n", who); |
750 gaim_privacy_permit_remove(gc->account, who); | 750 gaim_privacy_permit_remove(gc->account, who, TRUE); |
751 | 751 |
752 g_snprintf(buf, sizeof(buf), "AL %s", who); | 752 g_snprintf(buf, sizeof(buf), "AL %s", who); |
753 | 753 |
754 if (!msn_servconn_send_command(session->notification_conn, | 754 if (!msn_servconn_send_command(session->notification_conn, |
755 "REM", buf)) { | 755 "REM", buf)) { |
778 if (!msn_servconn_send_command(session->notification_conn, "REM", buf)) { | 778 if (!msn_servconn_send_command(session->notification_conn, "REM", buf)) { |
779 gaim_connection_error(gc, _("Write error")); | 779 gaim_connection_error(gc, _("Write error")); |
780 return; | 780 return; |
781 } | 781 } |
782 | 782 |
783 gaim_privacy_deny_add(gc->account, who); | 783 gaim_privacy_deny_add(gc->account, who, TRUE); |
784 | 784 |
785 g_snprintf(buf, sizeof(buf), "BL %s %s", who, who); | 785 g_snprintf(buf, sizeof(buf), "BL %s %s", who, who); |
786 | 786 |
787 if (!msn_servconn_send_command(session->notification_conn, "ADD", buf)) { | 787 if (!msn_servconn_send_command(session->notification_conn, "ADD", buf)) { |
788 gaim_connection_error(gc, _("Write error")); | 788 gaim_connection_error(gc, _("Write error")); |
801 if (!msn_servconn_send_command(session->notification_conn, "REM", buf)) { | 801 if (!msn_servconn_send_command(session->notification_conn, "REM", buf)) { |
802 gaim_connection_error(gc, _("Write error")); | 802 gaim_connection_error(gc, _("Write error")); |
803 return; | 803 return; |
804 } | 804 } |
805 | 805 |
806 gaim_privacy_permit_add(gc->account, who); | 806 gaim_privacy_permit_add(gc->account, who, TRUE); |
807 | |
808 g_snprintf(buf, sizeof(buf), "AL %s %s", who, who); | |
809 | |
810 if (!msn_servconn_send_command(session->notification_conn, "ADD", buf)) { | |
811 gaim_connection_error(gc, _("Write error")); | |
812 return; | |
813 } | |
814 } | 807 } |
815 | 808 |
816 static void | 809 static void |
817 msn_set_permit_deny(GaimConnection *gc) | 810 msn_set_permit_deny(GaimConnection *gc) |
818 { | 811 { |
884 return; | 877 return; |
885 } | 878 } |
886 } | 879 } |
887 | 880 |
888 for (; t != NULL; t = t->next) | 881 for (; t != NULL; t = t->next) |
889 gaim_privacy_permit_remove(gc->account, t->data); | 882 gaim_privacy_permit_remove(gc->account, t->data, TRUE); |
890 | 883 |
891 if (t != NULL) | 884 if (t != NULL) |
892 g_slist_free(t); | 885 g_slist_free(t); |
893 | 886 |
894 t = NULL; | 887 t = NULL; |
922 return; | 915 return; |
923 } | 916 } |
924 } | 917 } |
925 | 918 |
926 for (; t != NULL; t = t->next) | 919 for (; t != NULL; t = t->next) |
927 gaim_privacy_deny_remove(gc->account, t->data); | 920 gaim_privacy_deny_remove(gc->account, t->data, TRUE); |
928 | 921 |
929 if (t != NULL) | 922 if (t != NULL) |
930 g_slist_free(t); | 923 g_slist_free(t); |
931 | 924 |
932 g_slist_free(session->lists.block); | 925 g_slist_free(session->lists.block); |
1028 char outparams[MSN_BUF_LEN]; | 1021 char outparams[MSN_BUF_LEN]; |
1029 MsnGroup *old_group, *new_group; | 1022 MsnGroup *old_group, *new_group; |
1030 | 1023 |
1031 old_group = msn_groups_find_with_name(session->groups, old_group_name); | 1024 old_group = msn_groups_find_with_name(session->groups, old_group_name); |
1032 new_group = msn_groups_find_with_name(session->groups, new_group_name); | 1025 new_group = msn_groups_find_with_name(session->groups, new_group_name); |
1033 | |
1034 gaim_debug(GAIM_DEBUG_MISC, "msn", "new_group = %p\n", new_group); | |
1035 | 1026 |
1036 if (new_group == NULL) { | 1027 if (new_group == NULL) { |
1037 g_snprintf(outparams, sizeof(outparams), "%s 0", | 1028 g_snprintf(outparams, sizeof(outparams), "%s 0", |
1038 msn_url_encode(new_group_name)); | 1029 msn_url_encode(new_group_name)); |
1039 | 1030 |