about summary refs log tree commit diff stats
path: root/src/config/accounts.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-11-22 00:39:52 +0000
committerJames Booth <boothj5@gmail.com>2016-11-22 00:39:52 +0000
commite043029a5069a30e8a7154a07d46260bece6358c (patch)
tree8e5affaa094513ae5d9c8c0c082f20f57e83629c /src/config/accounts.c
parentc441dbfa42e58796f87fdcbb02ee4aa19cca2469 (diff)
downloadprofani-tty-e043029a5069a30e8a7154a07d46260bece6358c.tar.gz
Allow clearing account resource
issue #880
Diffstat (limited to 'src/config/accounts.c')
-rw-r--r--src/config/accounts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c
index 233a5aa8..7dc852ae 100644
--- a/src/config/accounts.c
+++ b/src/config/accounts.c
@@ -585,6 +585,15 @@ accounts_clear_muc(const char *const account_name)
 }
 
 void
+accounts_clear_resource(const char *const account_name)
+{
+    if (accounts_account_exists(account_name)) {
+        g_key_file_remove_key(accounts, account_name, "resource", NULL);
+        _save_accounts();
+    }
+}
+
+void
 accounts_clear_otr(const char *const account_name)
 {
     if (accounts_account_exists(account_name)) {