Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Nardog/12
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} function p.main(frame) if not frame.args[1] then return nil end local lang = mw.getContentLanguage() local t = { '{|class="wikitable sortable"\n!User!!R!!Blocked!!Admin!!Reason\n' } for v in mw.text.gsplit(frame.args[1], '%s*\n%s*') do if v ~= '' then local date = mw.ustring.match(v, '%d%d:%d%d,%s%d%d?%s%u%l+%s%d%d%d%d') local admin = mw.ustring.match(v, '%d%d%d%d%s(.-)%stalk%scontribs%s') local user = mw.ustring.match(v, 'talk%scontribs%sblocked%s(.-)%stalk') or mw.ustring.match(v, 'changed%sblock%ssettings%sfor%s(.-)%stalk') or mw.ustring.match(v, '"User:(.-)@global"') or mw.ustring.match(v, '/wiki/Special:[^/]-/(.+)') or mw.ustring.match(v, '[&%?]user=([^&#]+)') or mw.ustring.match(v, '%x+:%x-:[%x:]*/?%d*') or mw.ustring.match(v, '%d+%.%d+%.%d+%.%d+/?%d*') or mw.ustring.match(v, '^[^#<>%[%]|{}/@:]+$') local reason = mw.ustring.match(v, '%)%s%((.+)%)') if user then local template = 'checkuser' local red = '' if user:find('^%x+:%x-:[%x:]*/?%d*$') or user:find('^%d+%.%d+%.%d+%.%d+/?%d*$') then template = 'checkip' else user = mw.uri.decode(user, 'WIKI') red = p.r(user, 13) end user = frame:expandTemplate{ title = template, args = { user } } date = date and 'data-sort-type=' .. lang:formatDate('U', date) .. '|' .. date or '' admin = admin or '' reason = reason or '' table.insert(t, string.format('|-\n|%s||%s||%s||%s||%s\n', user, red, date, admin, reason)) end end end table.insert(t, '|}') return table.concat(t) end function p.r(s, n) local t = {} for char in mw.ustring.gmatch(s, '.') do local cp = mw.ustring.codepoint(char) local dec if (cp >= 65 and cp < 77) or (cp >= 97 and cp <= 109) then dec = cp + n elseif (cp >= 78 and cp <= 90) or (cp >= 110 and cp <= 122) then dec = cp - n end dec = dec and mw.ustring.char(dec) table.insert(t, dec or char) end return table.concat(t) end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/Nardog/12/doc
(
edit
)