Module:Sock list
Appearance
![]() | This module depends on the following other modules: |
Implements {{sock list}}.
Usage
{{#invoke:Sock list|main}}
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