Jump to content

Module:User:A diehard editor/Randmessage

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by A diehard editor (talk | contribs) at 16:46, 28 March 2023 (remove references to british english). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-------------------------------

---- THIS IS A USER MODULE ----

-------------------------------


local p = {}

local random_messages = {
	"[[WP:Vandals|Vandals]] are crucial in keeping Wikipedians employed... in the fields of counter-vandalism.",
	"If ClueBot NG became sentient, it would pay people to vandalize the encyclopedia so that it can keep its job.",
	"This user may or may not reply in [[International Phonetic Alphabet]].",
}

function arrlen(len)
	local incr=0
	for _ in pairs(len) do
		incr=incr+1
	end
	
	return incr
end

function p.random_msg()
	math.randomseed(os.clock()*10000000)
	math.random(); math.random(); math.random()

	return random_messages[math.random(arrlen(random_messages))]
end

return p