equal
deleted
inserted
replaced
306 char **actor, const char **reason) |
306 char **actor, const char **reason) |
307 { |
307 { |
308 LmMessageNode *y, *z; |
308 LmMessageNode *y, *z; |
309 const char *p, *actorjid, *actornick; |
309 const char *p, *actorjid, *actornick; |
310 |
310 |
311 y = lm_message_node_find_child(xmldata, "item"); |
311 y = lm_message_node_get_child(xmldata, "item"); |
312 if (!y) |
312 if (!y) |
313 return; |
313 return; |
314 |
314 |
315 p = lm_message_node_get_attribute(y, "affiliation"); |
315 p = lm_message_node_get_attribute(y, "affiliation"); |
316 if (p) { |
316 if (p) { |
332 from, p); |
332 from, p); |
333 } |
333 } |
334 *mbjid = lm_message_node_get_attribute(y, "jid"); |
334 *mbjid = lm_message_node_get_attribute(y, "jid"); |
335 *mbnick = lm_message_node_get_attribute(y, "nick"); |
335 *mbnick = lm_message_node_get_attribute(y, "nick"); |
336 // For kick/ban, there can be actor and reason tags |
336 // For kick/ban, there can be actor and reason tags |
337 z = lm_message_node_find_child(y, "actor"); |
337 z = lm_message_node_get_child(y, "actor"); |
338 if (z) { |
338 if (z) { |
339 actornick = lm_message_node_get_attribute(z, "nick"); |
339 actornick = lm_message_node_get_attribute(z, "nick"); |
340 actorjid = lm_message_node_get_attribute(z, "jid"); |
340 actorjid = lm_message_node_get_attribute(z, "jid"); |
341 if (actorjid) { |
341 if (actorjid) { |
342 if (actornick) { |
342 if (actornick) { |
656 g_free(reason_msg); |
656 g_free(reason_msg); |
657 g_free(mbuf_end); |
657 g_free(mbuf_end); |
658 } else { |
658 } else { |
659 // Natural leave |
659 // Natural leave |
660 if (our_presence) { |
660 if (our_presence) { |
661 LmMessageNode *destroynode = lm_message_node_find_child(xmldata, |
661 LmMessageNode *destroynode = lm_message_node_get_child(xmldata, |
662 "destroy"); |
662 "destroy"); |
663 if (destroynode) { |
663 if (destroynode) { |
664 reason = lm_message_node_get_child_value(destroynode, "reason"); |
664 reason = lm_message_node_get_child_value(destroynode, "reason"); |
665 if (reason && *reason) { |
665 if (reason && *reason) { |
666 mbuf = g_strdup_printf("You have left %s, " |
666 mbuf = g_strdup_printf("You have left %s, " |