diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-02-24 01:35:33 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-02-24 01:35:33 +0000 |
commit | 4ef5a9ba3a393aedb0e44a98388e4269f65941b2 (patch) | |
tree | 96b3655db94e7b9a61e647d200e0b46cc667b110 | |
parent | 87b95d522985595b949d29a0252b3a618a1093d1 (diff) | |
download | prosody-4ef5a9ba3a393aedb0e44a98388e4269f65941b2.tar.gz prosody-4ef5a9ba3a393aedb0e44a98388e4269f65941b2.zip |
prosody, prosodyctl: Use plugin_paths in addition to, not instead of, the default plugin path
-rwxr-xr-x | prosody | 6 | ||||
-rwxr-xr-x | prosodyctl | 6 |
2 files changed, 8 insertions, 4 deletions
@@ -186,10 +186,12 @@ function init_global_state() local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; local custom_plugin_paths = config.get("*", "core", "plugin_paths"); if custom_plugin_paths then - CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3 + local path_sep = package.config:sub(3,3); + -- path1;path2;path3;defaultpath... + CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); end prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, - plugins = CFG_PLUGINDIR, data = data_path }; + plugins = CFG_PLUGINDIR or "plugins", data = data_path }; prosody.arg = _G.arg; @@ -112,10 +112,12 @@ config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } }); local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; local custom_plugin_paths = config.get("*", "core", "plugin_paths"); if custom_plugin_paths then - CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3 + local path_sep = package.config:sub(3,3); + -- path1;path2;path3;defaultpath... + CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); end prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, - plugins = CFG_PLUGINDIR, data = data_path }; + plugins = CFG_PLUGINDIR or "plugins", data = data_path }; require "core.loggingmanager" |