<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ASanctions</id>
	<title>Module:Sanctions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ASanctions"/>
	<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:Sanctions&amp;action=history"/>
	<updated>2026-05-07T03:23:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://wiki.stiles.casa/index.php?title=Module:Sanctions&amp;diff=7811&amp;oldid=prev</id>
		<title>imported&gt;ProcrastinatingReader: sync remainder of sandbox changes (see section @ Template talk:Gs for description)</title>
		<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:Sanctions&amp;diff=7811&amp;oldid=prev"/>
		<updated>2022-02-12T13:01:56Z</updated>

		<summary type="html">&lt;p&gt;sync remainder of sandbox changes (see section @ &lt;a href=&quot;/index.php?title=Template_talk:Gs&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template talk:Gs (page does not exist)&quot;&gt;Template talk:Gs&lt;/a&gt; for description)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local rawData = mw.loadData(&amp;#039;Module:Sanctions/data&amp;#039;)&lt;br /&gt;
local data = rawData.sanctions&lt;br /&gt;
local aliasMap = rawData.aliases&lt;br /&gt;
&lt;br /&gt;
local messageBox = require(&amp;#039;Module:Message box&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
-- Functions&lt;br /&gt;
&lt;br /&gt;
local function tableContainsValue(needle, haystack)&lt;br /&gt;
	for _, v in pairs(haystack) do&lt;br /&gt;
		if v == needle then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function _getTopicData(topicAlias)&lt;br /&gt;
	if data[topicAlias] then&lt;br /&gt;
		return data[topicAlias]&lt;br /&gt;
	elseif aliasMap[topicAlias] then&lt;br /&gt;
		return data[aliasMap[topicAlias]]&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an invalid topic error, with a table of acceptable topics&lt;br /&gt;
local function syntaxHelp()&lt;br /&gt;
	return [[&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;{{para|topic}} not specified. Available options:&amp;lt;/span&amp;gt;&amp;lt;div style=&amp;quot;border-left: 5px dashed black; border-right: 5px dashed black; border-bottom: 5px dashed black; padding-left: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
	{{Gs/topics/table}}&lt;br /&gt;
	&amp;lt;/div&amp;gt;]]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Topic class&lt;br /&gt;
&lt;br /&gt;
local Topic = {}&lt;br /&gt;
Topic.__index = Topic&lt;br /&gt;
&lt;br /&gt;
function Topic.new(topicCode, args)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj._args = args&lt;br /&gt;
	obj._topicData = _getTopicData(topicCode)&lt;br /&gt;
	&lt;br /&gt;
	return setmetatable(obj, Topic)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:get(arg)&lt;br /&gt;
	return self._topicData[arg]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:exists()&lt;br /&gt;
	return ((self._topicData ~= nil) and (self._topicData ~= false))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasGlobalRestriction(type)&lt;br /&gt;
	return self._topicData.restrictions[type]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasLocalRestriction(type)&lt;br /&gt;
	local localRestriction = self._args[type]&lt;br /&gt;
	if localRestriction then&lt;br /&gt;
		if mw.ustring.find(type, &amp;#039;^restriction&amp;#039;) ~= nil then&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			return yesno(localRestriction)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasRestriction(type)&lt;br /&gt;
	return self:hasGlobalRestriction(type) or self:hasLocalRestriction(type)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasRestrictions(arr)&lt;br /&gt;
	for _, v in ipairs(arr) do&lt;br /&gt;
		if self:hasRestriction(v) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasAnyRevertRestrictions()&lt;br /&gt;
	return self:hasRestrictions({&amp;#039;1rr&amp;#039;, &amp;#039;consensusrequired&amp;#039;, &amp;#039;brd&amp;#039;})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:hasAnyRestrictions()&lt;br /&gt;
	return self:hasAnyRevertRestrictions() or self:hasRestrictions({&amp;#039;restriction1&amp;#039;})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Topic:getCustomRestrictions()&lt;br /&gt;
	local customRestrictions = {}&lt;br /&gt;
	local ri = 1&lt;br /&gt;
	local checkArr = self._topicData.restrictions&lt;br /&gt;
	local breakNext = false&lt;br /&gt;
	while true do&lt;br /&gt;
		if checkArr[&amp;#039;restriction&amp;#039;..ri] then&lt;br /&gt;
			table.insert(customRestrictions, checkArr[&amp;#039;restriction&amp;#039;..ri])&lt;br /&gt;
			ri = ri + 1&lt;br /&gt;
		else&lt;br /&gt;
			if breakNext then&lt;br /&gt;
				break&lt;br /&gt;
			else&lt;br /&gt;
				ri = 1&lt;br /&gt;
				checkArr = self._args&lt;br /&gt;
				breakNext = true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return customRestrictions&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- End classes&lt;br /&gt;
&lt;br /&gt;
-- This function builds a talk notice&lt;br /&gt;
-- TODO: split this up&lt;br /&gt;
--&lt;br /&gt;
-- @param frame&lt;br /&gt;
-- @param topic topic class instance&lt;br /&gt;
-- @param args arguments passed to wrapper template&lt;br /&gt;
-- @returns String representation of notice&lt;br /&gt;
local function buildTalkNotice(frame, topic, args)&lt;br /&gt;
	local type = args[&amp;#039;type&amp;#039;] or args[2] or &amp;#039;mini&amp;#039;&lt;br /&gt;
	local out = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	local hasRestrictions = topic:hasAnyRestrictions()&lt;br /&gt;
	local hasRevertRestrictions = topic:hasAnyRevertRestrictions()&lt;br /&gt;
	&lt;br /&gt;
	if hasRestrictions then&lt;br /&gt;
		type = &amp;#039;long&amp;#039; -- force long displaywhere custom restrictions are applicable&lt;br /&gt;
&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;font-size&amp;#039;, &amp;#039;120%&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;WARNING: ACTIVE COMMUNITY SANCTIONS&amp;#039;&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if hasRestrictions then&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;The article [[:{{SUBJECTPAGENAME}}]], along with other pages relating to &amp;quot;..topic:get(&amp;#039;scope&amp;#039;)..&amp;quot;, is currently subject to &amp;#039;&amp;#039;&amp;#039;[[SW:AC/DS|discretionary sanctions]]&amp;#039;&amp;#039;&amp;#039; authorised by the community. The current restrictions are:&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;&amp;lt;strong&amp;gt;The use of [[SW:AC/DS|discretionary sanctions]] has been authorised by the community for pages related to &amp;quot;.. topic:get(&amp;#039;scope&amp;#039;) ..&amp;quot;, including this page.&amp;lt;/strong&amp;gt;&amp;quot; .. (type == &amp;#039;mini&amp;#039; and &amp;#039; Editors who repeatedly or seriously fail to adhere to the [[Stiles.casa Wiki:Five_pillars|purpose of Stiles.casa Wiki]], any expected [[Stiles.casa Wiki:Etiquette|standards of behaviour]], or any [[Stiles.casa Wiki:List_of_policies|normal editorial process]] may be sanctioned.&amp;#039; or &amp;#039;&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not (type == &amp;#039;mini&amp;#039;) then&lt;br /&gt;
		local restrictionList = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
		-- 1RR&lt;br /&gt;
		if topic:hasRestriction(&amp;#039;1rr&amp;#039;) then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;Limit of one revert in 24 hours:&amp;#039;&amp;#039;&amp;#039; This article is under [[Stiles.casa Wiki:Edit warring#Other revert rules|SW:1RR]] (one [[Stiles.casa Wiki:Reverting|revert]] per editor per article &amp;#039;&amp;#039;per 24-hour period&amp;#039;&amp;#039;)&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Text for boilerplate/predefined restrictions&lt;br /&gt;
		if topic:hasRestriction(&amp;#039;consensusrequired&amp;#039;) then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;Consensus required:&amp;#039;&amp;#039;&amp;#039; All editors must obtain [[SW:Consensus|consensus]] on the talk page of this article before reinstating &amp;#039;&amp;#039;any edits that have been challenged (via reversion).&amp;#039;&amp;#039; This includes making edits similar to the ones that have been challenged. If in doubt, do not make the edit.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if topic:hasRestriction(&amp;#039;brd&amp;#039;) then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;24-hr [[Stiles.casa Wiki:BOLD, revert, discuss cycle|BRD cycle]]:&amp;#039;&amp;#039;&amp;#039; If a change you make to this article is reverted, you may not reinstate that change unless you discuss the issue on the talk page and wait 24 hours (from the time of the original edit). Partial reverts/reinstatements that reasonably address objections of other editors [[Stiles.casa Wiki:BOLD, revert, discuss cycle#SW:BRR|are preferable]] to wholesale reverts.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local customRestrictions = topic:getCustomRestrictions()&lt;br /&gt;
		for _, v in ipairs(customRestrictions) do&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(v)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if hasRestrictions then&lt;br /&gt;
			out:node(restrictionList)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;Editors who repeatedly or seriously fail to adhere to the [[Stiles.casa Wiki:Five_pillars|purpose of Stiles.casa Wiki]], any expected [[Stiles.casa Wiki:Etiquette|standards of behaviour]], or any [[Stiles.casa Wiki:List_of_policies|normal editorial process]] may be sanctioned.&amp;quot;)&lt;br /&gt;
			&lt;br /&gt;
		-- Further info box&lt;br /&gt;
		if hasRestrictions then&lt;br /&gt;
			local furtherInfo = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			-- Enforcement procedures&lt;br /&gt;
			furtherInfo&lt;br /&gt;
				:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;#039;Enforcement procedures:&amp;#039;)&lt;br /&gt;
					:done()&lt;br /&gt;
&lt;br /&gt;
			local enforcementProcedures = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			if hasRestrictions then&lt;br /&gt;
				enforcementProcedures&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Violations of any restrictions &amp;quot; .. (hasRevertRestrictions and &amp;quot;(excluding 1RR/reverting violations) &amp;quot; or &amp;quot;&amp;quot;) .. &amp;quot;and other conduct issues should be reported to the [[Stiles.casa Wiki:Administrators&amp;#039; noticeboard/Incidents|administrators&amp;#039; incidents noticeboard]].&amp;quot; .. (hasRevertRestrictions and &amp;quot; Violations of revert restrictions should be reported to the [[SW:ANEW|administrators&amp;#039; edit warring noticeboard]].&amp;quot; or &amp;quot;&amp;quot;))&lt;br /&gt;
						:done()&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Editors who violate any listed restrictions may be blocked by any uninvolved administrator, even on a first offense.&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
			else&lt;br /&gt;
				enforcementProcedures&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Problems should be reported to the [[Stiles.casa Wiki:Administrators&amp;#039; noticeboard/Incidents|administrators&amp;#039; incidents noticeboard]].&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			enforcementProcedures&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;An editor must be [[Stiles.casa Wiki:Arbitration_Committee/Discretionary_sanctions#Awareness|aware]] before they can be sanctioned.&amp;quot;)&lt;br /&gt;
					:allDone()&lt;br /&gt;
			furtherInfo:node(enforcementProcedures)&lt;br /&gt;
&lt;br /&gt;
			if hasRevertRestrictions then&lt;br /&gt;
				furtherInfo&lt;br /&gt;
					:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;With respect to any reverting restrictions:&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
					:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Edits made solely to enforce any clearly established consensus are exempt from all edit-warring restrictions. In order to be considered \&amp;quot;clearly established\&amp;quot; the consensus must be proven by prior talk-page discussion.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Edits made which remove or otherwise change any material placed by clearly established consensus, without first obtaining consensus to do so, may be treated in the same manner as clear vandalism.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Clear vandalism of any origin may be reverted without restriction.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Reverts of edits made by anonymous (IP) editors that are not vandalism are exempt from the 1RR but are subject to [[Stiles.casa Wiki:Edit warring|the usual rules on edit warring]]. If you are in doubt, contact an administrator for assistance.&amp;quot;)&lt;br /&gt;
							:allDone()&lt;br /&gt;
					:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;If you are unsure if your edit is appropriate, discuss it here on this talk page first. &amp;lt;strong&amp;gt;Remember: When in doubt, don&amp;#039;t revert!&amp;lt;/strong&amp;gt;&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			local collapsed = frame:expandTemplate{ title = &amp;#039;collapse&amp;#039;, args = {&lt;br /&gt;
				tostring(furtherInfo),&lt;br /&gt;
				&amp;#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Remedy instructions and exemptions&amp;lt;/span&amp;gt;&amp;#039;,&lt;br /&gt;
				[&amp;#039;bg&amp;#039;] = &amp;#039;#EEE8AA&amp;#039;&lt;br /&gt;
			}}&lt;br /&gt;
			&lt;br /&gt;
			out&lt;br /&gt;
				:newline()&lt;br /&gt;
				:node(collapsed)&lt;br /&gt;
		end&lt;br /&gt;
		-- End further info box&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local box = messageBox.main( &amp;#039;tmbox&amp;#039;, {&lt;br /&gt;
		type = &amp;#039;notice&amp;#039;,&lt;br /&gt;
		image = type == &amp;#039;long&amp;#039; and &amp;#039;[[File:Commons-emblem-issue.svg|50px]]&amp;#039; or &amp;#039;[[Image:Commons-emblem-hand-orange.svg|40px]]&amp;#039;,&lt;br /&gt;
		text = frame:preprocess(tostring(out))&lt;br /&gt;
    })&lt;br /&gt;
&lt;br /&gt;
    return box&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Builds an alert notice&lt;br /&gt;
--&lt;br /&gt;
-- @param frame&lt;br /&gt;
-- @param topic topic class instance&lt;br /&gt;
-- @returns String representation of notice&lt;br /&gt;
local function buildAlert(frame, topic, sig)&lt;br /&gt;
	local out = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;gs-alert&amp;#039;)&lt;br /&gt;
		:cssText(&amp;quot;border: 1px solid #AAA; background-color: #E5F8FF; padding: 0.5em; width: 100%; margin-bottom: 1em&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	out&lt;br /&gt;
		:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:cssText(&amp;quot;vertical-align:middle; padding-left:1px; padding-right:0.5em;&amp;quot;)&lt;br /&gt;
				:wikitext(&amp;quot;[[File:Commons-emblem-notice.svg|50px]]&amp;quot;)&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;This is a standard message to notify contributors about an administrative ruling in effect. &amp;#039;&amp;#039;It does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; imply that there are any issues with your contributions to date.&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(&amp;quot;You have shown interest in &amp;quot;.. topic:get(&amp;#039;scope&amp;#039;) ..&amp;quot;. Due to past disruption in this topic area, the community has authorised uninvolved administrators to impose [[Stiles.casa Wiki:AC/DS|discretionary sanctions]]—such as [[Stiles.casa Wiki:Editing restrictions#Types of restrictions|editing restrictions]], [[Stiles.casa Wiki:Banning policy#Types of bans|bans]], or [[SW:Blocking policy|blocks]]—on editors who do not strictly follow [[Stiles.casa Wiki:List of policies|Stiles.casa Wiki&amp;#039;s policies]], expected [[Stiles.casa Wiki:Etiquette|standards of behaviour]], or the [[Stiles.casa Wiki:Arbitration_Committee/Discretionary_sanctions#Page_restrictions|page-specific restrictions]], when making edits related to the topic.&amp;quot;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(&amp;quot;For additional information, please see the [[&amp;quot;.. topic:get(&amp;#039;wikilink&amp;#039;) ..&amp;quot;|guidance on these sanctions]]. If you have any questions, or any doubts regarding what edits are appropriate, you are welcome to discuss them with me or any other editor.&amp;quot; .. (sig and &amp;#039; &amp;#039;..sig or &amp;#039;&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
	return frame:preprocess(tostring(out))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Builds an edit notice&lt;br /&gt;
local function buildEditNotice(frame, topic, args)&lt;br /&gt;
	local enHeader = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	local restrictionMsgs = {}&lt;br /&gt;
	&lt;br /&gt;
	if topic:hasRestriction(&amp;#039;1rr&amp;#039;) then&lt;br /&gt;
		table.insert(restrictionMsgs, &amp;quot;Editors must not make more than one [[Help:Reverting|revert]] per 24 hours (subject to [[SW:3RRNO|exceptions]])&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if topic:hasRestriction(&amp;#039;consensusrequired&amp;#039;) then&lt;br /&gt;
		table.insert(restrictionMsgs, &amp;quot;Editors must not reinstate any challenged edits (via reversion) without first obtaining [[SW:CONSENSUS|consensus]] on the talk page of this article&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local customRestrictions = topic:getCustomRestrictions()&lt;br /&gt;
	for _, v in ipairs(customRestrictions) do&lt;br /&gt;
		table.insert(restrictionMsgs, v)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if #restrictionMsgs == 0 then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	else&lt;br /&gt;
		local list = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
		for _,v in ipairs(restrictionMsgs) do&lt;br /&gt;
			list&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(v)&lt;br /&gt;
					:done()&lt;br /&gt;
		end&lt;br /&gt;
		enHeader:wikitext(tostring(list))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local enText = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	enText&lt;br /&gt;
		:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;&amp;lt;strong&amp;gt;Breaching the restriction on this page may result in a block or other sanctions.&amp;lt;/strong&amp;gt; In addition, please note that because this topic area has been disrupted in the past, the community has [[&amp;quot;..topic:get(&amp;#039;wikilink&amp;#039;)..&amp;quot;|authorised]] administrators to take [[SW:ACDS|appropriate steps]] to ensure the smooth running of all pages related to &amp;quot;..topic:get(&amp;#039;scope&amp;#039;)..&amp;quot;. Conduct which does not adhere to our policies and [[Stiles.casa Wiki:Etiquette|standards of behaviour]] may be met with sanctions. Please edit carefully.&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
&lt;br /&gt;
	local editnotice = frame:expandTemplate{ title = &amp;#039;editnotice&amp;#039;, args = {&lt;br /&gt;
		expiry = &amp;quot;indefinite&amp;quot;,&lt;br /&gt;
		headerstyle = &amp;quot;font-size: 120%;&amp;quot;,&lt;br /&gt;
		style = &amp;quot;background: ivory;&amp;quot;,&lt;br /&gt;
		image = &amp;quot;Commons-emblem-issue.svg&amp;quot;,&lt;br /&gt;
		imagesize = &amp;quot;50px&amp;quot;,&lt;br /&gt;
		header = tostring(enHeader),&lt;br /&gt;
		text = tostring(enText)&lt;br /&gt;
	}}&lt;br /&gt;
&lt;br /&gt;
	return editnotice&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--/////////--&lt;br /&gt;
-- EXPORTS&lt;br /&gt;
--/////////--&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns a talk notice&lt;br /&gt;
-- For documentation, see [[Template:Gs/talk notice]]&lt;br /&gt;
function p.talknotice(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/talk notice&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/talk notice/sandbox&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = Topic.new(args[&amp;#039;topic&amp;#039;] or args[1], args)&lt;br /&gt;
&lt;br /&gt;
	if not topic:exists() then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return buildTalkNotice(frame, topic, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an alert&lt;br /&gt;
-- For documentation, see [[Template:Gs/alert]]&lt;br /&gt;
function p.alert(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/alert&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/alert/sandbox&amp;#039;,&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = Topic.new(args[&amp;#039;topic&amp;#039;] or args[1], args)&lt;br /&gt;
	if not topic:exists() then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	elseif not topic:hasRestriction(&amp;#039;ds&amp;#039;) then&lt;br /&gt;
		return frame:preprocess(&amp;#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Discretionary sanctions are not authorised for this topic area. Alert is not required.&amp;lt;/span&amp;gt;&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return buildAlert(frame, topic, args[&amp;#039;sig&amp;#039;])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an edit notice&lt;br /&gt;
-- For documentation, see [[Template:Gs/editnotice]]&lt;br /&gt;
function p.editnotice(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/editnotice&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/editnotice/sandbox&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = Topic.new(args[&amp;#039;topic&amp;#039;] or args[1], args)&lt;br /&gt;
	if not topic:exists() then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	elseif not topic:hasAnyRestrictions() then&lt;br /&gt;
		return frame:preprocess(&amp;#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Page sanctions are not authorised for this topic area. Edit notice is not required.&amp;lt;/span&amp;gt;[[Category:Pages with sanctions errors]]&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return buildEditNotice(frame, topic, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.table(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/topics/table&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/topics/table/sandbox&amp;#039;,&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local tbl = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;font-size&amp;#039;, &amp;#039;9pt&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;background&amp;#039;, &amp;#039;transparent&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Headers&lt;br /&gt;
	tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Topic code&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Area of conflict&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Decision linked to&amp;quot;)&lt;br /&gt;
			:allDone()&lt;br /&gt;
	&lt;br /&gt;
	-- sort alphabetically&lt;br /&gt;
	local sortedTable = {}&lt;br /&gt;
	for n in pairs(data) do&lt;br /&gt;
		table.insert(sortedTable, n)&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(sortedTable)&lt;br /&gt;
&lt;br /&gt;
	for _,v in ipairs(sortedTable) do&lt;br /&gt;
		local sanction = data[v]&lt;br /&gt;
		local title = mw.title.new(sanction.wikilink).redirectTarget			-- probably unnecessarily expensive; just add to config&lt;br /&gt;
		tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(frame:preprocess(&amp;quot;{{tlx&amp;quot;..(args[&amp;#039;subst&amp;#039;] and &amp;quot;s&amp;quot; or &amp;quot;&amp;quot;)..&amp;quot;|{{#ifeq:{{BASEPAGENAME}}|Gs|{{PAGENAME}}|{{BASEPAGENAME}}}}|&amp;lt;nowiki&amp;gt;topic=&amp;lt;/nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;quot;..(sanction.palias or v)..&amp;quot;&amp;lt;/b&amp;gt;}}&amp;quot;))&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(sanction.scope)&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;[[&amp;quot;..title.fullText..&amp;quot;]]&amp;quot;)&lt;br /&gt;
				:allDone()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(tbl)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.topicsHelper(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/topics&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/topics/sandbox&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	if args[&amp;#039;sanctions scope&amp;#039;] and data[args[&amp;#039;sanctions scope&amp;#039;]] then&lt;br /&gt;
		return _getTopicData(args[&amp;#039;sanctions scope&amp;#039;]).scope&lt;br /&gt;
	elseif args[&amp;#039;sanctions link&amp;#039;] and data[args[&amp;#039;sanctions link&amp;#039;]] then&lt;br /&gt;
		return mw.title.new(_getTopicData(args[&amp;#039;sanctions link&amp;#039;]).wikilink).redirectTarget&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot; -- ?&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns true if the given topic name is a valid topic area&lt;br /&gt;
function p.checkIfValidTopic(topicName)&lt;br /&gt;
	local topic = Topic.new(topicName, nil)&lt;br /&gt;
	if topic:exists() then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;ProcrastinatingReader</name></author>
	</entry>
</feed>