Diff

core/configmanager.lua @ 5413:0bf5e90be086

configmanager: Some cleanup, remove unused variables and imports
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Apr 2013 08:14:55 +0100
parent 5380:e119e378b1d9
child 5776:bd0ff8ae98a8
child 5811:27ae988f5b70
line wrap: on
line diff
--- a/core/configmanager.lua	Mon Apr 01 23:44:28 2013 +0000
+++ b/core/configmanager.lua	Wed Apr 03 08:14:55 2013 +0100
@@ -7,8 +7,8 @@
 --
 
 local _G = _G;
-local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type, pairs, table =
-      setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type, pairs, table;
+local setmetatable, rawget, rawset, io, error, dofile, type, pairs, table =
+      setmetatable, rawget, rawset, io, error, dofile, type, pairs, table;
 local format, math_max = string.format, math.max;
 
 local fire_event = prosody and prosody.events.fire_event or function () end;
@@ -68,7 +68,6 @@
 
 -- Helper function to resolve relative paths (needed by config)
 do
-	local rel_path_start = ".."..path_sep;
 	function resolve_relative_path(parent_path, path)
 		if path then
 			-- Some normalization
@@ -152,7 +151,7 @@
 -- Built-in Lua parser
 do
 	local pcall, setmetatable = _G.pcall, _G.setmetatable;
-	local rawget, tostring = _G.rawget, _G.tostring;
+	local rawget = _G.rawget;
 	parsers.lua = {};
 	function parsers.lua.load(data, config_file, config)
 		local env;
@@ -213,7 +212,7 @@
 		end
 		env.component = env.Component;
 		
-		function env.Include(file, wildcard)
+		function env.Include(file)
 			if file:match("[*?]") then
 				local path_pos, glob = file:match("()([^"..path_sep.."]+)$");
 				local path = file:sub(1, math_max(path_pos-2,0));