diff options
author | James Booth <boothj5@gmail.com> | 2014-10-23 23:12:15 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-10-23 23:12:15 +0100 |
commit | 84765969e0cab6da881dfecc6dee7de7a038f80c (patch) | |
tree | e5434aa94a7ae04902056ebcc15dbf3945954f59 /src/config | |
parent | 552d88b931341b035548923b8e099bd25741064c (diff) | |
download | profani-tty-84765969e0cab6da881dfecc6dee7de7a038f80c.tar.gz |
Added /account clear [account] port
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/accounts.c | 10 | ||||
-rw-r--r-- | src/config/accounts.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c index fffb45e1..00cfba18 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -450,6 +450,15 @@ _accounts_clear_server(const char * const account_name) } static void +_accounts_clear_port(const char * const account_name) +{ + if (accounts_account_exists(account_name)) { + g_key_file_remove_key(accounts, account_name, "port", NULL); + _save_accounts(); + } +} + +static void _accounts_clear_otr(const char * const account_name) { if (accounts_account_exists(account_name)) { @@ -872,6 +881,7 @@ accounts_init_module(void) 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_port = _accounts_clear_port; accounts_clear_otr = _accounts_clear_otr; accounts_add_otr_policy = _accounts_add_otr_policy; } diff --git a/src/config/accounts.h b/src/config/accounts.h index a16c0cfb..97c125eb 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -79,6 +79,7 @@ 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); void (*accounts_clear_server)(const char * const account_name); +void (*accounts_clear_port)(const char * const account_name); void (*accounts_clear_otr)(const char * const account_name); void (*accounts_add_otr_policy)(const char * const account_name, const char * const contact_jid, const char * const policy); |