跳转到内容

模組:Spam-whitelist request

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Xiplus留言 | 贡献2021年3月17日 (三) 07:19编辑。这可能和当前版本存在着巨大的差异。

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