Module:User:Kephir/test3

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Users who showed up in RecentChanges:


local export = {}

function export.get_active_users(frame)
	local users = {}
	
	local rc = mw.text.unstrip(frame:preprocess "{{safesubst:Special:RecentChanges|limit=3000|days=40|hidebots=1|hideanons=1|hidemyself=1|hideminor=0|hidepatrolled=0}}")

	for m in rc:gmatch('<span class="mw%-usertoollinks">.-<a href="/wiki/Special:Contributions/(.-)"') do 
		users[mw.uri.decode(m, 'WIKI')] = true
	end
	
	local output = {}
	
	for user in pairs(users) do
		output[#output + 1] = "* [[User:" .. user .. "]]\n"
	end
	
	return table.concat(output)
end

return export