util/import.lua@b28b51746fe7
util/import.lua
Sun, 16 Nov 2008 04:39:48 +0500
- author
- Waqas Hussain <waqas20@gmail.com>
- date
- Sun, 16 Nov 2008 04:39:48 +0500
- changeset 310
- b28b51746fe7
- parent 49
-
1cd2a8db392d
- child 519
-
cccd610a0ef9
- permissions
- -rw-r--r--
Fixed mod_private to use session.send for sending stanzas
local t_insert = table.insert;
function import(module, ...)
local m = package.loaded[module] or require(module);
if type(m) == "table" and ... then
local ret = {};
for _, f in ipairs{...} do
t_insert(ret, m[f]);
end
return unpack(ret);
end
return m;
end