模組: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, "的限制 ==\n")
if url ~= "" then
table.insert(text, "* 網址:" .. url.host .. url.relativePath .. "\n")
else
table.insert(text, "* " .. error.error{[1] = "錯誤:沒有提供網址!\n"})
end
table.insert(text, "* 工具:[[Special:Log/spamblacklist/{{safesubst:REVISIONUSER}}}]]")
if url ~= "" then
table.insert(text, string.format("、[%s searchsbl]", mw.uri.encode(tostring(url))))
end
table.insert(text, "* 理由:" .. (args["理由"] or ""))
return table.concat(text)
end
return p