Mercurial > pidgin.yaz
comparison plugins/jabber/jabber.c @ 2078:0d53e0eb4456
[gaim-migrate @ 2088]
DESC in vCard.
committer: Tailor Script <tailor@pidgin.im>
author | Adam Fritzler <mid@auk.cx> |
---|---|
date | Wed, 18 Jul 2001 20:48:08 +0000 |
parents | 711d0115bf1e |
children | d83fe4ac3d7e |
comparison
equal
deleted
inserted
replaced
2077:824dc84315c7 | 2078:0d53e0eb4456 |
---|---|
920 xmlnode_free(x); | 920 xmlnode_free(x); |
921 } | 921 } |
922 | 922 |
923 static void jabber_handlevcard(gjconn j, xmlnode querynode, char *from) { | 923 static void jabber_handlevcard(gjconn j, xmlnode querynode, char *from) { |
924 char buf[1024]; | 924 char buf[1024]; |
925 char *fn, *url, *email, *nickname, *status; | 925 char *fn, *url, *email, *nickname, *status, *desc; |
926 jid who; | 926 jid who; |
927 char *buddy; | 927 char *buddy; |
928 struct jabber_data *jd = GJ_GC(j)->proto_data; | 928 struct jabber_data *jd = GJ_GC(j)->proto_data; |
929 int at = 0; | 929 int at = 0; |
930 | 930 |
933 | 933 |
934 fn = xmlnode_get_tag_data(querynode, "FN"); | 934 fn = xmlnode_get_tag_data(querynode, "FN"); |
935 url = xmlnode_get_tag_data(querynode, "URL"); | 935 url = xmlnode_get_tag_data(querynode, "URL"); |
936 email = xmlnode_get_tag_data(querynode, "EMAIL"); | 936 email = xmlnode_get_tag_data(querynode, "EMAIL"); |
937 nickname = xmlnode_get_tag_data(querynode, "NICKNAME"); | 937 nickname = xmlnode_get_tag_data(querynode, "NICKNAME"); |
938 desc = xmlnode_get_tag_data(querynode, "DESC"); | |
938 status = g_hash_table_lookup(jd->hash, buddy); | 939 status = g_hash_table_lookup(jd->hash, buddy); |
939 if (!status) | 940 if (!status) |
940 status = "Online"; | 941 status = "Online"; |
941 | 942 |
942 at = g_snprintf(buf, sizeof buf, "<B>Jabber ID:</B> %s<BR>", buddy); | 943 at = g_snprintf(buf, sizeof buf, "<B>Jabber ID:</B> %s<BR>", buddy); |
949 url, url); | 950 url, url); |
950 if (email) | 951 if (email) |
951 at += g_snprintf(buf + at, sizeof(buf) - at, | 952 at += g_snprintf(buf + at, sizeof(buf) - at, |
952 "<B>Email:</B> <A HREF=\"mailto:%s\">%s</A><BR>", email, email); | 953 "<B>Email:</B> <A HREF=\"mailto:%s\">%s</A><BR>", email, email); |
953 at += g_snprintf(buf + at, sizeof(buf) - at, "<B>Status:</B> %s\n", status); | 954 at += g_snprintf(buf + at, sizeof(buf) - at, "<B>Status:</B> %s\n", status); |
954 | 955 if (desc) |
956 at += g_snprintf(buf + at, sizeof(buf) - at, "<HR>%s<br>\n", desc); | |
957 | |
955 g_show_info_text(buf); | 958 g_show_info_text(buf); |
956 g_free(buddy); | 959 g_free(buddy); |
957 } | 960 } |
958 | 961 |
959 static void jabber_handleauthresp(gjconn j, jpacket p) | 962 static void jabber_handleauthresp(gjconn j, jpacket p) |