Home
Random
Recent changes
Special pages
Community portal
Settings
About Irony Wiki
Disclaimers
Irony Wiki
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Server subbox autocat
β οΈ
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 instead of your IP, along with other benefits.
Anti-spam check. Do
not
fill this in!
-- Simple module for use on {{Server subbox}} -- Automatically adds page to [[Category:Banned <server> users]], [[Category:Former <server> users]], or [[Category:<server> users]] depending on arguments and whether such categories exist. local p = {} local yesno = require("Module:Yesno") function p.main(frame) -- Parameters |server= |status= |nocat= local server = mw.text.trim(frame.args.server) if server == "" or yesno(frame.args.nocat) then return "" end local status = mw.ustring.lower(frame.args.status) if mw.ustring.find(status, "banned") ~= nil then local title = mw.title.new("Category:Banned " .. server .. " users") if title.exists then return "[[Category:Banned " .. server .. " users]]" else return "[[Category:" .. server .. " users]]" end elseif mw.ustring.find(status, "left") ~= nil or mw.ustring.find(status, "no longer in") ~= nil then local title = mw.title.new("Category:Former " .. server .. " users") if title.exists then return "[[Category:Former " .. server .. " users]]" else return "[[Category:" .. server .. " users]]" end else return "[[Category:" .. server .. " users]]" end end return p
Summary:
Please note that all contributions to Irony Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Irony Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Server subbox autocat/doc
(
edit
)