模块:Salt levels

local p = {};
function p.main()
	local level = mw.title.getCurrentTitle().protectionLevels.create;
	if(level == nil) then 
		return -1;
	end
	if(level[1] == "autoconfirmed") then
		return 0;
	else 
		if(level[1] == "templateeditor") then
			return 1;
		else 
			if(level[1] == "sysop") then
				return 2;
			else
				return -1;
			end;
		end
	end
end
return p;