Module:User:A diehard editor/Randmessage
Appearance
-------------------------------
---- 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]].",
"'''Warning''': This user uses mdy dates. {{small|This notice brought to you by the British Grammar Police.}}",
"'''WARNING''': This user spells centre, colour, organisation, offence, and artefact wrong. {{small|This notice brought to you by the British Grammar Police.}}",
"This user spells center, color, organization, offense, and artifact properly. {{small|Scored 100,000 on an American Grammar Police-provided English test.}}"
}
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