Jump to content

Module:Sandbox/Wnt

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wnt (talk | contribs) at 00:16, 13 June 2014 (true also works. But this won't work ... gives a loop, time for running scripts has expired. I know that {} ~= {} but I didn't expect that.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}
 
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
p[{}] = function (action, args)
	return "action = " .. (action or 'NIL') .. "args[1] = " .. (args[1] or 'NIL')
end
 
setmetatable(p, { __index = function(t, k)
	return function(frame)
	    return t[{}](k, frame.args)
	end
end })
 
return p