From 34d16d5b4b5265990125894572a90493284358cd Mon Sep 17 00:00:00 2001 From: anderspapitto Date: Sat, 5 Sep 2015 19:26:41 -0700 Subject: 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. --- conf.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'conf.c') 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); -- cgit v1.2.3