about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-04-10 01:15:11 +0100
committerJames Booth <boothj5@gmail.com>2016-04-10 01:15:11 +0100
commit03ab8baf4d5b1ad5474e571b66d0572624ef1c7a (patch)
tree04c0dcdee6f04064cd61d31cabdeec6a2adad003 /src/config
parent21aa08fdb13a62fbf8f13b445813741da1b60903 (diff)
downloadprofani-tty-03ab8baf4d5b1ad5474e571b66d0572624ef1c7a.tar.gz
Added /plugins load command
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c7
-rw-r--r--src/config/preferences.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 8844b389..0ad95dc4 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -605,6 +605,13 @@ prefs_get_plugins(void)
 }
 
 void
+prefs_add_plugin(const char *const name)
+{
+    conf_string_list_add(prefs, "plugins", "load", name);
+    _save_prefs();
+}
+
+void
 prefs_free_plugins(gchar **plugins)
 {
     g_strfreev(plugins);
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 8f18149c..287e56d3 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -187,6 +187,7 @@ void prefs_set_autoxa_time(gint value);
 
 gchar** prefs_get_plugins(void);
 void prefs_free_plugins(gchar **plugins);
+void prefs_add_plugin(const char *const name);
 
 char prefs_get_otr_char(void);
 void prefs_set_otr_char(char ch);