模組:Spam-whitelist request
外观

local p = {}
local error = require('Module:Error')
function p.main(frame)
local args = frame:getParent().args
local url = args["網址"] or ""
local text = {}
local host = ""
table.insert(text, "== 申請解除對域名")
if url ~= "" then
url = mw.uri.new(url)
table.insert(text, " " .. url.host .. " ")
end
table.insert(text, "的限制 ==")
table.insert(text, "\n* 網址:")
if url ~= "" then
table.insert(text, url.host .. url.relativePath .. "")
else
table.insert(text, error.error{[1] = "錯誤:沒有提供網址!"})
end
table.insert(text, "\n* 工具:[[Special:Log/spamblacklist/{{safesubst:REVISIONUSER}}]]")
if url ~= "" then
table.insert(text, string.format("、[%s searchsbl]", mw.uri.encode(tostring(url))))
end
table.insert(text, "\n* 理由:" .. (args["理由"] or ""))
return table.concat(text)
end
return p