Documentation for this module may be created at Module:Member/doc
local getArgs = require('Module:Arguments').getArgs
VariablesLua = mw.ext.VariablesLua
local Member = {}
function Member.main(frame)
local args = getArgs(frame)
local members = ''
local newMember = {
id=args.id,
name=args.name,
flag=args.flag,
position=args.position,
captain=args.captain,
joindate=args.joindate,
leavedate=args.leavedate,
inactivedate=args.inactivedate,
newteam=args.newteam
}
if VariablesLua.varexists('Members') and #VariablesLua.var('Members') > 0 then
members = VariablesLua.var('Members')
members = members .. '&&&' .. mw.text.jsonEncode(newMember)
else
members = mw.text.jsonEncode(newMember)
end
VariablesLua.vardefine( 'Members', members )
return 'yes'
end
return Member