mcabber/src/xmpp_iq.c
changeset 1652 8036750d0169
parent 1636 e38300775548
child 1653 fca9a4c17432
equal deleted inserted replaced
1651:d0a0d96ed5d5 1652:8036750d0169
   383       field  = lm_message_node_get_child(form, "field");
   383       field  = lm_message_node_get_child(form, "field");
   384       while (field && strcmp("groupchats",
   384       while (field && strcmp("groupchats",
   385                              lm_message_node_get_attribute(field, "var")))
   385                              lm_message_node_get_attribute(field, "var")))
   386         field = field->next;
   386         field = field->next;
   387 
   387 
   388       for (x = field->children ; x ; x = x->next)
   388       if (field)
   389       {
   389         for (x = field->children ; x ; x = x->next)
   390         LmMessageNode *to_leave = lm_message_node_get_child(x, "value");
   390         {
   391         if (to_leave) {
   391           if (!strcmp (x->name, "value")) {
   392           GList* b = buddy_search_jid(lm_message_node_get_value(to_leave));
   392             GList* b = buddy_search_jid(lm_message_node_get_value(x));
   393           if (b)
   393             if (b)
   394             cmd_room_leave(b->data, "Requested by remote command");
   394               cmd_room_leave(b->data, "Requested by remote command");
       
   395           }
   395         }
   396         }
   396       }
       
   397       lm_message_node_add_dataform_result(command,
   397       lm_message_node_add_dataform_result(command,
   398                                           "Groupchats have been left");
   398                                           "Groupchats have been left");
   399     }
   399     }
   400   }
   400   }
   401   if (sessionid)
   401   if (sessionid)