Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp.c @ 2137:0bfc4bfc127c
Add support for storing passwords to a MUC (Nico Golde)
(Imported from the Debian package.)
This patch (by Nico Golde <nion@debian.org>) adds support for storing
MUC passwords.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 06 Jul 2014 13:12:10 +0200 |
parents | fc7a758ebbde |
children | f063e36425a2 |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c Sun Jul 06 11:06:31 2014 +0200 +++ b/mcabber/mcabber/xmpp.c Sun Jul 06 13:12:10 2014 +0200 @@ -2284,7 +2284,7 @@ // If the node is a conference item, let's add the note to our list. if (x->name && !strcmp(x->name, "conference")) { struct bookmark *bm_elt; - const char *autojoin, *name, *nick; + const char *autojoin, *name, *nick, *passwd; const char *fjid = lm_message_node_get_attribute(x, "jid"); if (!fjid) continue; @@ -2293,12 +2293,15 @@ autojoin = lm_message_node_get_attribute(x, "autojoin"); nick = lm_message_node_get_child_value(x, "nick"); name = lm_message_node_get_attribute(x, "name"); + passwd = lm_message_node_get_child_value(x, "password"); if (autojoin && (!strcmp(autojoin, "1") || !strcmp(autojoin, "true"))) bm_elt->autojoin = 1; if (nick) bm_elt->nick = g_strdup(nick); if (name) bm_elt->name = g_strdup(name); + if (passwd) + bm_elt->password = g_strdup(passwd); sl_bookmarks = g_slist_append(sl_bookmarks, bm_elt); } }