util/import.lua

Fri, 21 May 2010 23:40:29 +0200

author
Tobias Markmann <tm@ayena.de>
date
Fri, 21 May 2010 23:40:29 +0200
changeset 3095
3e0d9ed57283
parent 2923
b7049746bd29
permissions
-rw-r--r--

util.sasl.plain: Removing plain_hashed authentication provider. Just do hashing and comparison yourself in a plain_test authentication provider.

-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- 
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--



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

mercurial