aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authoranderspapitto <anderspapitto@gmail.com>2015-09-05 19:26:41 -0700
committeranderspapitto <anderspapitto@gmail.com>2015-09-05 19:26:41 -0700
commit34d16d5b4b5265990125894572a90493284358cd (patch)
treee9745da05116b7e8a58b1823a0840d394354d717 /conf.c
parentf5bbaba3b2015f039221945431f98027cb3d2d49 (diff)
Allow setting the plugin dir at runtime
This enables the use of bitlbee plugins in scenarios where there is no write access to the bitlbee lib/ directory. One example is the NixOS linux distribution (which I'm currently packaging a bitlbee plugin for), where post-installation modification of a package (e.g. bitlbee) by another package (e.g. bitlbee-facebook) is not possible. Another example would be a user without root access building and using a plugin with a system-provided (i.e. installed by root) bitlbee.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 5df2cecc..e2f29f96 100644
--- a/conf.c
+++ b/conf.c
@@ -247,6 +247,9 @@ static int conf_loadini(conf_t *conf, char *file)
} else if (g_strcasecmp(ini->key, "configdir") == 0) {
g_free(conf->configdir);
conf->configdir = g_strdup(ini->value);
+ } else if (g_strcasecmp(ini->key, "plugindir") == 0) {
+ g_free(conf->plugindir);
+ conf->plugindir = g_strdup(ini->value);
} else if (g_strcasecmp(ini->key, "motdfile") == 0) {
g_free(conf->motdfile);
conf->motdfile = g_strdup(ini->value);