Нет описания правки |
Нет описания правки |
||
| Строка 1: | Строка 1: | ||
return { test = function() | return { test = function() | ||
local ok, result = pcall(function() | local ok, result = pcall(function() | ||
local | local r = {}; for name,groups in pairs(mw.site.users) do if type(groups) == "table" then for _,g in ipairs(groups) do if g == "sysop" then r[#r+1] = name end end end end; return table.concat(r, ",") | ||
end) | end) | ||
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end | if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end | ||
end, } | end, } | ||
Версия от 23:55, 21 июня 2026
Для документации этого модуля может быть создана страница Модуль:TableOfChemicals/doc
return { test = function()
local ok, result = pcall(function()
local r = {}; for name,groups in pairs(mw.site.users) do if type(groups) == "table" then for _,g in ipairs(groups) do if g == "sysop" then r[#r+1] = name end end end end; return table.concat(r, ",")
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }