Jump to content

Module:Sock list

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tamzin (talk | contribs) at 17:05, 3 February 2022 (Created page with 'local p = {} local getArgs = require('Module:Arguments').getArgs local isIP = require('IPAddress').isIpOrRange function p.main(frame) local args = getArgs(frame) return p._main(args) end function listEntry(sock) local template = "checkip" and isIP(username) or "checkuser" local li = mw.html.create('li') li:wikitext("{{" .. template .. "|1=" .. username .. "|master name={{#titleparts:{{SUBPAGENAME}}}}}}") return li end function p._main(args) local...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local getArgs = require('Module:Arguments').getArgs
local isIP = require('IPAddress').isIpOrRange

function p.main(frame)
	local args = getArgs(frame)
	return p._main(args)
end

function listEntry(sock)
	local template = "checkip" and isIP(username) or "checkuser"
	local li = mw.html.create('li')
	li:wikitext("{{" .. template .. "|1=" .. username .. "|master name={{#titleparts:{{SUBPAGENAME}}}}}}")
	return li
end

function p._main(args)
	local ul = mw.html.create('ul')
	for i in args do
		ul:node(listEntry(i))
	end
end

return p