Mercurial > pidgin
comparison libpurple/protocols/msn/contact.c @ 30990:05b3fa3725a1
Read the MPOP setting from the AB.
Refs #13017.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 02 Dec 2010 06:14:19 +0000 |
parents | 5c2af6c30e52 |
children | 3cff7a5e0351 |
comparison
equal
deleted
inserted
replaced
30989:7bf659dbacee | 30990:05b3fa3725a1 |
---|---|
708 continue; | 708 continue; |
709 | 709 |
710 uid = xmlnode_get_data(contactId); | 710 uid = xmlnode_get_data(contactId); |
711 type = xmlnode_get_data(contactType); | 711 type = xmlnode_get_data(contactType); |
712 | 712 |
713 /*setup the Display Name*/ | 713 /* Find out our settings */ |
714 if (type && !strcmp(type, "Me")) { | 714 if (type && !strcmp(type, "Me")) { |
715 /* setup the Display Name */ | |
715 if (purple_connection_get_display_name(pc) == NULL) { | 716 if (purple_connection_get_display_name(pc) == NULL) { |
716 char *friendly = NULL; | 717 char *friendly = NULL; |
717 if ((displayName = xmlnode_get_child(contactInfo, "displayName"))) | 718 if ((displayName = xmlnode_get_child(contactInfo, "displayName"))) |
718 friendly = xmlnode_get_data(displayName); | 719 friendly = xmlnode_get_data(displayName); |
719 purple_connection_set_display_name(pc, | 720 purple_connection_set_display_name(pc, |
720 friendly ? purple_url_decode(friendly) : NULL); | 721 friendly ? purple_url_decode(friendly) : NULL); |
721 g_free(friendly); | 722 g_free(friendly); |
722 } | 723 } |
724 | |
725 for (annotation = xmlnode_get_child(contactInfo, "annotations/Annotation"); | |
726 annotation; | |
727 annotation = xmlnode_get_next_twin(annotation)) { | |
728 char *name, *value; | |
729 name = xmlnode_get_data(xmlnode_get_child(annotation, "Name")); | |
730 value = xmlnode_get_data(xmlnode_get_child(annotation, "Value")); | |
731 if (!strcmp(name, "MSN.IM.MPOP")) { | |
732 if (!value || atoi(value) != 0) | |
733 purple_account_set_bool(session->account, "mpop", TRUE); | |
734 else | |
735 purple_account_set_bool(session->account, "mpop", FALSE); | |
736 } | |
737 g_free(name); | |
738 g_free(value); | |
739 } | |
740 | |
723 continue; /* Not adding own account as buddy to buddylist */ | 741 continue; /* Not adding own account as buddy to buddylist */ |
724 } | 742 } |
725 | 743 |
726 passportName = xmlnode_get_child(contactInfo, "passportName"); | 744 passportName = xmlnode_get_child(contactInfo, "passportName"); |
727 if (passportName == NULL) { | 745 if (passportName == NULL) { |