From 276f7f39a238e460b67ecbc0fa4f6666797b3c13 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 13 Dec 2013 10:25:40 +0100 Subject: prosody: Store the config file name so the same file can be used when reloading --- prosody | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prosody b/prosody index 9a88eac0..ee2baca5 100755 --- a/prosody +++ b/prosody @@ -86,6 +86,7 @@ function read_config() break; end end + prosody.config_file = filename local ok, level, err = config.load(filename); if not ok then print("\n"); @@ -240,7 +241,7 @@ function init_global_state() function prosody.reload_config() log("info", "Reloading configuration file"); prosody.events.fire_event("reloading-config"); - local ok, level, err = config.load((rawget(_G, "CFG_CONFIGDIR") or ".").."/prosody.cfg.lua"); + local ok, level, err = config.load(prosody.config_file); if not ok then if level == "parser" then log("error", "There was an error parsing the configuration file: %s", tostring(err)); -- cgit v1.2.3 From 8dfeb6207a594197160c19bb5e3e98aae07c2885 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 13 Dec 2013 12:52:03 +0000 Subject: mod_muc: Allow admins to always bypass restrict_room_creation (thanks Chris B) --- plugins/muc/mod_muc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 0f1beb0e..c8488a85 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -155,7 +155,7 @@ function stanza_handler(event) return true; end if not(restrict_room_creation) or - (restrict_room_creation == "admin" and is_admin(stanza.attr.from)) or + is_admin(stanza.attr.from)) or (restrict_room_creation == "local" and select(2, jid_split(stanza.attr.from)) == module.host:gsub("^[^%.]+%.", "")) then room = create_room(bare); end -- cgit v1.2.3