diff options
author | Gary Kramlich <grim@reaperworld.com> | 2022-10-01 22:10:59 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2022-10-01 22:10:59 -0500 |
commit | ecae1783702a313399485532a24be05d936c18d8 (patch) | |
tree | b441da4ecf920b82b343fd7f594485f7a67bd7b7 /libpurple/accounts.c | |
parent | 8f8f2a3f945d49c2596790ec04c64069f7a5fbc9 (diff) | |
download | pidgin-ecae1783702a313399485532a24be05d936c18d8.tar.gz |
Add a require-password property to PurpleAccount
This will be able to be to set the a user so that an account so that an account
with an optional password will require a password for login.
Testing Done:
Compiled
Bugs closed: PIDGIN-17688
Reviewed at https://reviews.imfreedom.org/r/1876/
Diffstat (limited to 'libpurple/accounts.c')
-rw-r--r-- | libpurple/accounts.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpurple/accounts.c b/libpurple/accounts.c index 152f03adfa..9f014749ef 100644 --- a/libpurple/accounts.c +++ b/libpurple/accounts.c @@ -309,6 +309,7 @@ parse_account(PurpleXmlNode *node) char *name = NULL; char *data; gboolean enabled = FALSE; + gboolean require_password = FALSE; child = purple_xmlnode_get_child(node, "id"); if(child != NULL) { @@ -330,6 +331,11 @@ parse_account(PurpleXmlNode *node) name = purple_xmlnode_get_data(child); } + child = purple_xmlnode_get_child(node, "require_password"); + if(child != NULL) { + require_password = atoi(purple_xmlnode_get_data(child)); + } + child = purple_xmlnode_get_child(node, "enabled"); if(child != NULL) { enabled = atoi(purple_xmlnode_get_data(child)); @@ -351,6 +357,7 @@ parse_account(PurpleXmlNode *node) "username", name, "protocol-id", protocol_id, "enabled", enabled, + "require-password", require_password, NULL); g_free(id); |