about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-05-11 15:32:38 +0100
committerJames Booth <boothj5@gmail.com>2014-05-11 15:32:38 +0100
commit3967b26aea502e9773651a3992925af510ddffa4 (patch)
treee4f9e14597cffb6f212f367e9e4108e10d19c461 /src/config
parentd44e954f6b4e24d5d2ba1da2f1dbc537a580a589 (diff)
downloadprofani-tty-3967b26aea502e9773651a3992925af510ddffa4.tar.gz
Added otr to /account clear properties
Diffstat (limited to 'src/config')
-rw-r--r--src/config/accounts.c10
-rw-r--r--src/config/accounts.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c
index 0f7be510..cf7c4c93 100644
--- a/src/config/accounts.c
+++ b/src/config/accounts.c
@@ -390,6 +390,15 @@ _accounts_clear_password(const char * const account_name)
 }
 
 static void
+_accounts_clear_otr(const char * const account_name)
+{
+    if (accounts_account_exists(account_name)) {
+        g_key_file_remove_key(accounts, account_name, "otr.policy", NULL);
+        _save_accounts();
+    }
+}
+
+static void
 _accounts_set_muc_service(const char * const account_name, const char * const value)
 {
     if (accounts_account_exists(account_name)) {
@@ -689,5 +698,6 @@ 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_otr = _accounts_clear_otr;
 }
 
diff --git a/src/config/accounts.h b/src/config/accounts.h
index de3c2a0f..60f8aa04 100644
--- a/src/config/accounts.h
+++ b/src/config/accounts.h
@@ -66,5 +66,6 @@ void (*accounts_set_priority_all)(const char * const account_name, const gint va
 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_otr)(const char * const account_name);
 
 #endif