Mercurial > hg
changeset 1652:8036750d0169
Fix leave_groupchats remote command
Reported by Nixtrian
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Sun, 22 Nov 2009 23:38:31 +0200 |
parents | d0a0d96ed5d5 |
children | fca9a4c17432 8effa82ae593 |
files | mcabber/src/xmpp_iq.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/xmpp_iq.c Wed Nov 18 05:59:44 2009 +0200 +++ b/mcabber/src/xmpp_iq.c Sun Nov 22 23:38:31 2009 +0200 @@ -385,15 +385,15 @@ lm_message_node_get_attribute(field, "var"))) field = field->next; - for (x = field->children ; x ; x = x->next) - { - LmMessageNode *to_leave = lm_message_node_get_child(x, "value"); - if (to_leave) { - GList* b = buddy_search_jid(lm_message_node_get_value(to_leave)); - if (b) - cmd_room_leave(b->data, "Requested by remote command"); + if (field) + for (x = field->children ; x ; x = x->next) + { + if (!strcmp (x->name, "value")) { + GList* b = buddy_search_jid(lm_message_node_get_value(x)); + if (b) + cmd_room_leave(b->data, "Requested by remote command"); + } } - } lm_message_node_add_dataform_result(command, "Groupchats have been left"); }