aboutsummaryrefslogtreecommitdiffstats
path: root/storage_xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage_xml.c')
-rw-r--r--storage_xml.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/storage_xml.c b/storage_xml.c
index 4237e10e..107983cf 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -85,7 +85,7 @@ static void handle_settings(struct xt_node *node, set_t **head)
static xt_status handle_account(struct xt_node *node, gpointer data)
{
struct xml_parsedata *xd = data;
- char *protocol, *handle, *server, *password = NULL, *autoconnect, *tag;
+ char *protocol, *handle, *server, *password = NULL, *autoconnect, *tag, *locked;
char *pass_b64 = NULL;
unsigned char *pass_cr = NULL;
int pass_len, local = 0;
@@ -98,6 +98,7 @@ static xt_status handle_account(struct xt_node *node, gpointer data)
server = xt_find_attr(node, "server");
autoconnect = xt_find_attr(node, "autoconnect");
tag = xt_find_attr(node, "tag");
+ locked = xt_find_attr(node, "locked");
protocol = xt_find_attr(node, "protocol");
if (protocol) {
@@ -126,6 +127,9 @@ static xt_status handle_account(struct xt_node *node, gpointer data)
if (local) {
acc->flags |= ACC_FLAG_LOCAL;
}
+ if (locked && !g_strcasecmp(locked, "true")) {
+ acc->flags |= ACC_FLAG_LOCKED;
+ }
} else {
g_free(pass_cr);
g_free(password);
@@ -319,6 +323,9 @@ struct xt_node *xml_generate(irc_t *irc)
if (acc->server && acc->server[0]) {
xt_add_attr(cur, "server", acc->server);
}
+ if (acc->flags & ACC_FLAG_LOCKED) {
+ xt_add_attr(cur, "locked", "true");
+ }
g_free(pass_b64);