mod_firewall/mod_firewall.lua
changeset 5838 866a49f5aa61
parent 5797 e304e19536f2
child 5870 1d1eadff331d
equal deleted inserted replaced
5837:58df53eefa28 5838:866a49f5aa61
   610 end
   610 end
   611 
   611 
   612 local function resolve_script_path(script_path)
   612 local function resolve_script_path(script_path)
   613 	local relative_to = prosody.paths.config;
   613 	local relative_to = prosody.paths.config;
   614 	if script_path:match("^module:") then
   614 	if script_path:match("^module:") then
   615 		relative_to = module.path:sub(1, -#("/mod_"..module.name..".lua"));
   615 		relative_to = module:get_directory();
   616 		script_path = script_path:match("^module:(.+)$");
   616 		script_path = script_path:match("^module:(.+)$");
   617 	end
   617 	end
   618 	return resolve_relative_path(relative_to, script_path);
   618 	return resolve_relative_path(relative_to, script_path);
   619 end
   619 end
   620 
   620