Bureaucrats, Moderators (CommentStreams), Interface administrators, Push subscription managers, Suppressors, Administrators
13,390
edits
No edit summary |
No edit summary |
||
| Line 84: | Line 84: | ||
function p.getRandomSubpage(frame) | function p.getRandomSubpage(frame) | ||
local seed = os.time() + (tonumber(frame.args[1]) or 0) | |||
math.randomseed(seed % 1000000) -- Ensure valid seed range | |||
local max = #subpages | local max = #subpages | ||
local randomIndex = math.random(1, max) | local randomIndex = math.random(1, max) | ||
| Line 89: | Line 91: | ||
end | end | ||
function p.testRandomness(frame) | function p.testRandomness(frame) | ||
local results = {} | local results = {} | ||