559 } |
559 } |
560 |
560 |
561 static void storage_bookmarks_parse_conference(LmMessageNode *node) |
561 static void storage_bookmarks_parse_conference(LmMessageNode *node) |
562 { |
562 { |
563 const char *fjid, *name, *autojoin; |
563 const char *fjid, *name, *autojoin; |
564 const char *pstatus, *awhois, *group; |
564 const char *pstatus, *awhois, *fjoins, *group; |
565 char *bjid; |
565 char *bjid; |
566 GSList *room_elt; |
566 GSList *room_elt; |
567 |
567 |
568 fjid = lm_message_node_get_attribute(node, "jid"); |
568 fjid = lm_message_node_get_attribute(node, "jid"); |
569 if (!fjid) |
569 if (!fjid) |
570 return; |
570 return; |
571 name = lm_message_node_get_attribute(node, "name"); |
571 name = lm_message_node_get_attribute(node, "name"); |
572 autojoin = lm_message_node_get_attribute(node, "autojoin"); |
572 autojoin = lm_message_node_get_attribute(node, "autojoin"); |
573 awhois = lm_message_node_get_attribute(node, "autowhois"); |
573 awhois = lm_message_node_get_attribute(node, "autowhois"); |
574 pstatus = lm_message_node_get_child_value(node, "print_status"); |
574 pstatus = lm_message_node_get_child_value(node, "print_status"); |
|
575 fjoins = lm_message_node_get_child_value(node, "flag_joins"); |
575 group = lm_message_node_get_child_value(node, "group"); |
576 group = lm_message_node_get_child_value(node, "group"); |
576 |
577 |
577 bjid = jidtodisp(fjid); // Bare jid |
578 bjid = jidtodisp(fjid); // Bare jid |
578 |
579 |
579 // Make sure this is a room (it can be a conversion user->room) |
580 // Make sure this is a room (it can be a conversion user->room) |
611 i = autowhois_on; |
612 i = autowhois_on; |
612 else if (!strcmp(awhois, "0") || !(strcmp(awhois, "false"))) |
613 else if (!strcmp(awhois, "0") || !(strcmp(awhois, "false"))) |
613 i = autowhois_off; |
614 i = autowhois_off; |
614 if (i != autowhois_default) |
615 if (i != autowhois_default) |
615 buddy_setautowhois(room_elt->data, i); |
616 buddy_setautowhois(room_elt->data, i); |
|
617 } |
|
618 if (fjoins) { |
|
619 enum room_flagjoins i; |
|
620 for (i = flagjoins_none; i <= flagjoins_all; i++) |
|
621 if (!strcasecmp(fjoins, strflagjoins[i])) |
|
622 break; |
|
623 if (i <= flagjoins_all) |
|
624 buddy_setflagjoins(room_elt->data, i); |
616 } |
625 } |
617 |
626 |
618 // Is autojoin set? |
627 // Is autojoin set? |
619 // If it is, we'll look up for more information (nick? password?) and |
628 // If it is, we'll look up for more information (nick? password?) and |
620 // try to join the room. |
629 // try to join the room. |