Added clear command to /account for password clearing

fixes #267
This commit is contained in:
James Booth
2013-12-08 23:36:00 +00:00
parent 3ce0d0f877
commit 1c2661f1c3
3 changed files with 46 additions and 9 deletions

View File

@@ -443,6 +443,15 @@ accounts_set_password(const char * const account_name, const char * const value)
}
}
void
accounts_clear_password(const char * const account_name)
{
if (accounts_account_exists(account_name)) {
g_key_file_remove_key(accounts, account_name, "password", NULL);
_save_accounts();
}
}
void
accounts_set_muc_service(const char * const account_name, const char * const value)
{

View File

@@ -80,5 +80,6 @@ void accounts_set_priority_dnd(const char * const account_name, const gint value
void accounts_set_priority_all(const char * const account_name, const gint value);
gint accounts_get_priority_for_presence_type(const char * const account_name,
resource_presence_t presence_type);
void accounts_clear_password(const char * const account_name);
#endif