void accounts_add_otr_policy(const char *const account_name, const char *const contact_jid, const char *const policy) { if (accounts_account_exists(account_name)) { GString *key = g_string_new("otr."); g_string_append(key, policy); conf_string_list_add(accounts, account_name, key->str, contact_jid); g_string_free(key, TRUE); // check for and remove from other lists if (strcmp(policy, "manual") == 0) { conf_string_list_remove(accounts, account_name, "otr.opportunistic", contact_jid); conf_string_list_remove(accounts, account_name, "otr.always", contact_jid); } if (strcmp(policy, "opportunistic") == 0) { conf_string_list_remove(accounts, account_name, "otr.manual", contact_jid); conf_string_list_remove(accounts, account_name, "otr.always", contact_jid); } if (strcmp(policy, "always") == 0) { conf_string_list_remove(accounts, account_name, "otr.opportunistic", contact_jid); conf_string_list_remove(accounts, account_name, "otr.manual", contact_jid); } _save_accounts(); } }
int plugin_settings_string_list_add(const char *const group, const char *const key, const char *const value) { int res = conf_string_list_add(settings, group, key, value); _save_settings(); return res; }
gboolean prefs_add_room_notify_trigger(const char * const text) { gboolean res = conf_string_list_add(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", text); _save_prefs(); if (res) { autocomplete_add(room_trigger_ac, text); } return res; }
void prefs_add_plugin(const char *const name) { conf_string_list_add(prefs, "plugins", "load", name); _save_prefs(); }