Added /account clear [account] server

This commit is contained in:
James Booth
2014-10-23 23:07:27 +01:00
parent 91883fd95d
commit 552d88b931
4 changed files with 16 additions and 0 deletions

View File

@@ -440,6 +440,15 @@ _accounts_clear_password(const char * const account_name)
}
}
static void
_accounts_clear_server(const char * const account_name)
{
if (accounts_account_exists(account_name)) {
g_key_file_remove_key(accounts, account_name, "server", NULL);
_save_accounts();
}
}
static void
_accounts_clear_otr(const char * const account_name)
{
@@ -862,6 +871,7 @@ accounts_init_module(void)
accounts_set_priority_all = _accounts_set_priority_all;
accounts_get_priority_for_presence_type = _accounts_get_priority_for_presence_type;
accounts_clear_password = _accounts_clear_password;
accounts_clear_server = _accounts_clear_server;
accounts_clear_otr = _accounts_clear_otr;
accounts_add_otr_policy = _accounts_add_otr_policy;
}