Jump to content

Module:RfX tally: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with 'local p = {} local rfx = require("Module:Rfx") function p.main(frame) local title = mw.text.trim(frame.args[1]) local obj if title == nil or #title == 0 then obj = rfx.new(mw.title.getCurrentTitle()) else obj = rfx.new("Wikipedia:Requests for bueraucratship/" .. title) if obj == nil then obj = rfx.new("Wikipedia:Requests for adminship/" .. title) end end if obj == nil then return "(?/?/?)" else return string.format("(%s/%s/%s)",obj.su...'
(No difference)

Revision as of 19:15, 3 July 2021

local p = {}
local rfx = require("Module:Rfx")
function p.main(frame)
	local title = mw.text.trim(frame.args[1])
	local obj
	if title == nil or #title == 0 then
		obj = rfx.new(mw.title.getCurrentTitle())
	else
		obj = rfx.new("Wikipedia:Requests for bueraucratship/" .. title)
		if obj == nil then
			obj = rfx.new("Wikipedia:Requests for adminship/" .. title)
		end	
	end
	if obj == nil then
		return "(?/?/?)"
	else
		return string.format("(%s/%s/%s)",obj.supports,obj.opposes,obj.neutrals)
	end
end
return p