Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp_iqrequest.c @ 1979:6febc7d1f760
Add /room setopt flag_joins (Hermitifier)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 26 Mar 2011 14:45:19 +0100 |
parents | e6beab22099b |
children | 45e0b13a39e2 |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp_iqrequest.c Sat Mar 26 13:56:41 2011 +0100 +++ b/mcabber/mcabber/xmpp_iqrequest.c Sat Mar 26 14:45:19 2011 +0100 @@ -561,7 +561,7 @@ static void storage_bookmarks_parse_conference(LmMessageNode *node) { const char *fjid, *name, *autojoin; - const char *pstatus, *awhois, *group; + const char *pstatus, *awhois, *fjoins, *group; char *bjid; GSList *room_elt; @@ -572,6 +572,7 @@ autojoin = lm_message_node_get_attribute(node, "autojoin"); awhois = lm_message_node_get_attribute(node, "autowhois"); pstatus = lm_message_node_get_child_value(node, "print_status"); + fjoins = lm_message_node_get_child_value(node, "flag_joins"); group = lm_message_node_get_child_value(node, "group"); bjid = jidtodisp(fjid); // Bare jid @@ -614,6 +615,14 @@ if (i != autowhois_default) buddy_setautowhois(room_elt->data, i); } + if (fjoins) { + enum room_flagjoins i; + for (i = flagjoins_none; i <= flagjoins_all; i++) + if (!strcasecmp(fjoins, strflagjoins[i])) + break; + if (i <= flagjoins_all) + buddy_setflagjoins(room_elt->data, i); + } // Is autojoin set? // If it is, we'll look up for more information (nick? password?) and