Comparison

core/modulemanager.lua @ 4746:37020f4b6799

modulemanager: Remove unused function imports
author Matthew Wild <mwild1@gmail.com>
date Sat, 28 Apr 2012 02:22:42 +0100
parent 4745:d5b1a7531693
child 4776:dbe9d75c0452
comparison
equal deleted inserted replaced
4745:d5b1a7531693 4746:37020f4b6799
12 local pluginloader = require "util.pluginloader"; 12 local pluginloader = require "util.pluginloader";
13 13
14 local hosts = hosts; 14 local hosts = hosts;
15 local prosody = prosody; 15 local prosody = prosody;
16 16
17 local loadfile, pcall, xpcall = loadfile, pcall, xpcall; 17 local pcall, xpcall = pcall, xpcall;
18 local setmetatable, setfenv, getfenv = setmetatable, setfenv, getfenv; 18 local setmetatable, rawget, setfenv = setmetatable, rawget, setfenv;
19 local pairs, ipairs = pairs, ipairs; 19 local pairs, type, tostring = pairs, type, tostring;
20 local t_insert, t_concat = table.insert, table.concat;
21 local type = type;
22 local next = next;
23 local rawget = rawget;
24 local error = error;
25 local tostring, tonumber = tostring, tonumber;
26 20
27 local debug_traceback = debug.traceback; 21 local debug_traceback = debug.traceback;
28 local unpack, select = unpack, select; 22 local unpack, select = unpack, select;
29 pcall = function(f, ...) 23 pcall = function(f, ...)
30 local n = select("#", ...); 24 local n = select("#", ...);
31 local params = {...}; 25 local params = {...};
32 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); 26 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end);
33 end 27 end
34 28
35 local array, set = require "util.array", require "util.set"; 29 local set = require "util.set";
36 30
37 local autoload_modules = {"presence", "message", "iq", "offline", "c2s", "s2s"}; 31 local autoload_modules = {"presence", "message", "iq", "offline", "c2s", "s2s"};
38 local component_inheritable_modules = {"tls", "dialback", "iq"}; 32 local component_inheritable_modules = {"tls", "dialback", "iq"};
39 33
40 -- We need this to let modules access the real global namespace 34 -- We need this to let modules access the real global namespace