<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.xmethod.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ARFC</id>
	<title>Module:RFC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.xmethod.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ARFC"/>
	<link rel="alternate" type="text/html" href="https://wiki.xmethod.net/index.php?title=Module:RFC&amp;action=history"/>
	<updated>2026-05-01T21:03:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.4</generator>
	<entry>
		<id>https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3438&amp;oldid=prev</id>
		<title>Docmoates: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3438&amp;oldid=prev"/>
		<updated>2026-01-01T14:37:46Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:37, 1 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Docmoates</name></author>
	</entry>
	<entry>
		<id>https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3437&amp;oldid=prev</id>
		<title>wiki&gt;Dandorid: Add option &#039;comment&#039; for summary() to display a comment in a {{Block indent}}.</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3437&amp;oldid=prev"/>
		<updated>2025-10-14T06:45:49Z</updated>

		<summary type="html">&lt;p&gt;Add option &amp;#039;comment&amp;#039; for summary() to display a comment in a {{Block indent}}.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:45, 14 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>wiki&gt;Dandorid</name></author>
	</entry>
	<entry>
		<id>https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3436&amp;oldid=prev</id>
		<title>wiki&gt;Dandorid: Add option &#039;comment&#039; for summary() to display a comment in a {{Block indent}}.</title>
		<link rel="alternate" type="text/html" href="https://wiki.xmethod.net/index.php?title=Module:RFC&amp;diff=3436&amp;oldid=prev"/>
		<updated>2025-10-14T06:45:49Z</updated>

		<summary type="html">&lt;p&gt;Add option &amp;#039;comment&amp;#039; for summary() to display a comment in a {{Block indent}}.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Implements {{Sum RFC}}, {{Ref RFC}}, and {{IETF RFC}}&lt;br /&gt;
require( &amp;#039;strict&amp;#039; )&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local err = require(&amp;#039;Module:Error&amp;#039;)._error&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local sectionMatch = function (n, t) return	&amp;#039;&amp;lt;section%s+begin=rfc&amp;#039; .. n .. t .. &amp;#039;%s*/&amp;gt;(.-)&amp;lt;section%s+end=rfc&amp;#039; .. n .. t .. &amp;#039;%s*/&amp;gt;&amp;#039; end&lt;br /&gt;
local isblank = function (v) return (v or &amp;#039;&amp;#039;) == &amp;#039;&amp;#039; end&lt;br /&gt;
&lt;br /&gt;
local function summary(args, dbContent, frame)&lt;br /&gt;
	--implements {{Ref RFC/summary}}, which is only used by {{Sum RFC}}&lt;br /&gt;
	--args.ref(false): add a reference to the summary.&lt;br /&gt;
	--args.plain(false): do not prepend the RFC number with &amp;#039;RFC&amp;#039;.&lt;br /&gt;
	--args.title(true): include the title of the RFC.&lt;br /&gt;
	--args.status(true): include the status of the RFC.&lt;br /&gt;
	--args.notes(false): include the notes of the RFC.&lt;br /&gt;
	--args.comment(&amp;#039;&amp;#039;): add a {{Block indent}} with a comment.&lt;br /&gt;
	if not frame then frame = mw.getCurrentFrame() end&lt;br /&gt;
	local refContent = &amp;quot;&amp;quot;&lt;br /&gt;
	local rfc = isblank(tonumber(args[1])) and 0 or tonumber(args[1])&lt;br /&gt;
	if not dbContent then&lt;br /&gt;
		dbContent = mw.title.new(&amp;#039;Template:Ref RFC/db/&amp;#039; .. math.floor(rfc/100)).content&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if yesno(args.ref or false, false) then&lt;br /&gt;
		refContent = p._ref({[1] = rfc, notes = yesno(args.refnotes or true, true) and &amp;#039;yes&amp;#039; or &amp;#039;no&amp;#039;}, dbContent, frame)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if yesno(args.plain or false, false) then&lt;br /&gt;
		return p._IETF({[1] = rfc, plainlink = &amp;#039;yes&amp;#039;}) .. refContent&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local output = {}&lt;br /&gt;
	table.insert(output, p._IETF({[1] = rfc, link = &amp;#039;no&amp;#039;}))&lt;br /&gt;
	if yesno(args.title or true, true) then&lt;br /&gt;
		local titleContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;title&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
		if rfc &amp;lt; 10000 then table.insert(output, &amp;#039;&amp;amp;numsp;&amp;#039;) end&lt;br /&gt;
		if rfc &amp;lt; 1000 then table.insert(output, &amp;#039;&amp;amp;numsp;&amp;#039;) end&lt;br /&gt;
		if rfc &amp;lt; 100 then table.insert(output, &amp;#039;&amp;amp;numsp;&amp;#039;) end&lt;br /&gt;
		if rfc &amp;lt; 10 then table.insert(output, &amp;#039;&amp;amp;numsp;&amp;#039;) end&lt;br /&gt;
		table.insert(output, string.format(&lt;br /&gt;
			&amp;#039;&amp;amp;ndash;&amp;amp;numsp;&amp;quot;%s&amp;quot;%s &amp;#039;,&lt;br /&gt;
			frame:extensionTag(&amp;#039;cite&amp;#039;, frame:preprocess(titleContent) .. &amp;#039;,&amp;#039;),&lt;br /&gt;
			refContent&lt;br /&gt;
		))&lt;br /&gt;
		if yesno(args.status or true, true) then&lt;br /&gt;
			local statusContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;status&amp;#039;))&lt;br /&gt;
			table.insert(output, &amp;quot;&amp;#039;&amp;#039;&amp;quot; .. statusContent .. &amp;quot;.&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		table.insert(output, &amp;#039; &amp;#039;)&lt;br /&gt;
		if yesno(args.notes or false, false) then&lt;br /&gt;
			local notesContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;notes&amp;#039;))&lt;br /&gt;
			table.insert(output, frame:preprocess(notesContent))&lt;br /&gt;
		end&lt;br /&gt;
	elseif yesno(args.ref or false, false) then&lt;br /&gt;
		table.insert(output, refContent)&lt;br /&gt;
	end&lt;br /&gt;
	if (not isblank(args.comment)) then&lt;br /&gt;
		table.insert(output, frame:expandTemplate{title = &amp;quot;Block indent&amp;quot;, args = {text = args.comment}})&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(output)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function secpage(section, page, pp)&lt;br /&gt;
	--implements {{Ref RFC/secpage}}, which is only used by {{Ref RFC/getref}}&lt;br /&gt;
	local output = {}&lt;br /&gt;
	if not isblank(section) then&lt;br /&gt;
		table.insert(output, &amp;#039;sec. &amp;#039; .. section)&lt;br /&gt;
		if not isblank(page) or not isblank(pp) then&lt;br /&gt;
			table.insert(output, &amp;#039;,&amp;amp;nbsp;&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not isblank(page) then&lt;br /&gt;
		table.insert(output, &amp;#039;p. &amp;#039; .. page)&lt;br /&gt;
	elseif not isblank(pp) then&lt;br /&gt;
		table.insert(output, &amp;#039;pp. &amp;#039; .. pp)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not isblank(page) or not isblank(pp) or not isblank(section) then&lt;br /&gt;
		table.insert(output, &amp;#039;.&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(output)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getref(rfc, section, page, pp, notes, quote, status, dbContent, frame)&lt;br /&gt;
	-- implements {{Ref RFC/getref}}, which is only used by {{REf RFC}}&lt;br /&gt;
	if not frame then frame = mw.getCurrentFrame() end&lt;br /&gt;
	local output = {}&lt;br /&gt;
	local refContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;ref&amp;#039;))&lt;br /&gt;
	table.insert(output, refContent .. &amp;#039; &amp;#039;)&lt;br /&gt;
	if yesno(status or true, true) then&lt;br /&gt;
		local statusContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;status&amp;#039;))&lt;br /&gt;
		table.insert(output, &amp;quot;&amp;#039;&amp;#039;&amp;quot; .. statusContent .. &amp;quot;.&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(output, &amp;#039; &amp;#039; .. secpage(section, page, pp) .. &amp;#039; &amp;#039;)&lt;br /&gt;
	if yesno(notes or true, true) then&lt;br /&gt;
		local notesContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;notes&amp;#039;))&lt;br /&gt;
		table.insert(output, notesContent)&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(output, &amp;#039; &amp;#039;)&lt;br /&gt;
	if not isblank(quote) then&lt;br /&gt;
		table.insert(output, frame:extensionTag(&amp;#039;q&amp;#039;, quote))&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(output)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._IETF(args, frame)&lt;br /&gt;
	-- Implements {{IETF RFC}}&lt;br /&gt;
	if not frame then frame = mw.getCurrentFrame() end&lt;br /&gt;
	if not isblank(args[1]) then&lt;br /&gt;
		local cll = require(&amp;#039;Module:Catalog lookup link&amp;#039;)._main&lt;br /&gt;
		local cllArgs = {&lt;br /&gt;
			[&amp;#039;link-prefix&amp;#039;] = &amp;#039;https://www.rfc-editor.org/rfc/rfc&amp;#039;,&lt;br /&gt;
			[&amp;#039;list-leadout&amp;#039;] = args.leadout or &amp;#039;&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
		for i = 1, 9 do&lt;br /&gt;
			cllArgs[i] = tonumber(args[i])&lt;br /&gt;
		end&lt;br /&gt;
		if yesno(args.plainlink or false, false) == false and yesno(args.link or true, true) == true then&lt;br /&gt;
			cllArgs[&amp;#039;article-link&amp;#039;] = &amp;#039;RFC (identifier)&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if yesno(args.plainlink or false, false) == false then&lt;br /&gt;
			cllArgs[&amp;#039;article-name&amp;#039;] = &amp;#039;RFC&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		return cll(cllArgs, frame)&lt;br /&gt;
	else&lt;br /&gt;
		local errMsg = &amp;#039;Parameter error in {{[[Template:IETF RFC|IETF RFC]]}}: Missing [[RFC (identifier)|RFC]].&amp;#039;&lt;br /&gt;
		return err({message = errMsg, style = &amp;#039;font-size:inherit&amp;#039;, tag=&amp;#039;span&amp;#039;})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function p.IETF(frame)&lt;br /&gt;
	return p._IETF(getArgs(frame), frame)&lt;br /&gt;
end&lt;br /&gt;
		&lt;br /&gt;
function p._ref(args, dbContent, frame)&lt;br /&gt;
	--implements {{Ref RFC}}&lt;br /&gt;
	if not frame then frame = mw.getCurrentFrame() end&lt;br /&gt;
	local rfc = tonumber(args[1])&lt;br /&gt;
	if rfc then&lt;br /&gt;
		local db = &amp;#039;Template:Ref RFC/db/&amp;#039; .. math.floor(rfc/100)&lt;br /&gt;
		if (not dbContent) and rfc then&lt;br /&gt;
			dbContent = mw.title.new(db).content&lt;br /&gt;
		end&lt;br /&gt;
		if dbContent then&lt;br /&gt;
			local refContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;ref&amp;#039;))&lt;br /&gt;
			if refContent then&lt;br /&gt;
				local output = {}&lt;br /&gt;
				if yesno(args[&amp;#039;repeat&amp;#039;] or false, false) then&lt;br /&gt;
					output[1] =  frame:extensionTag(&amp;#039;ref&amp;#039;, &amp;#039;&amp;#039;, {name=&amp;#039;rfc&amp;#039; .. rfc})&lt;br /&gt;
				else&lt;br /&gt;
					output[1] = getref(rfc, args.section, args.p, args.pp, args.notes, args.quote, args.status, dbContent, frame)&lt;br /&gt;
					if yesno(args.ref or true, true) then&lt;br /&gt;
						local refname = &amp;#039;&amp;#039;&lt;br /&gt;
						if isblank(args.p) and isblank(args.pp) and isblank(args.section) and isblank(args.quote) then&lt;br /&gt;
							refname = &amp;#039;rfc&amp;#039; .. rfc&lt;br /&gt;
						end&lt;br /&gt;
						output[1] = frame:extensionTag(&amp;#039;ref&amp;#039;, output[1], {name = refname})&lt;br /&gt;
					else&lt;br /&gt;
						output[1] = frame:preprocess(output[1])&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if not isblank(args.rp) then&lt;br /&gt;
					table.insert(output, frame:expandTemplate{title = &amp;#039;rp&amp;#039;, args = {page = args.rp}})&lt;br /&gt;
				end&lt;br /&gt;
				if not isblank(args.rpp) then&lt;br /&gt;
					table.insert(output, frame:expandTemplate{title = &amp;#039;rp&amp;#039;, args = {pages = args.rpp}})&lt;br /&gt;
				end&lt;br /&gt;
				if not isblank(args.rsection) then&lt;br /&gt;
					table.insert(output, frame:expandTemplate{title = &amp;#039;rp&amp;#039;, args = {at = &amp;#039;§&amp;#039; ..args.rsection}})&lt;br /&gt;
				end&lt;br /&gt;
				return table.concat(output)&lt;br /&gt;
			else&lt;br /&gt;
				local errMsg = &amp;#039;REFERENCE FOR RFC&amp;#039; .. rfc .. &amp;#039; IS NOT DEFINED YET.&amp;#039;&lt;br /&gt;
				return err({errMsg}) .. &amp;#039; You are invited to add it [[&amp;#039; .. db .. &amp;#039;|here]].&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			local errMsg = &amp;#039;REFERENCE FOR RFC&amp;#039; .. rfc .. &amp;#039; IS NOT DEFINED YET.&amp;#039;&lt;br /&gt;
			return err({errMsg}) .. &amp;#039; You are invited to add it [[Template:Ref RFC/db|here]].&amp;#039;&lt;br /&gt;
		end			&lt;br /&gt;
	else&lt;br /&gt;
		local errMsg = &amp;#039;Parameter error in {{[[Template:Ref RFC|Ref RFC]]}}: Missing [[RFC (identifier)|RFC]].&amp;#039;&lt;br /&gt;
		return err({message = errMsg, style = &amp;#039;font-size:inherit&amp;#039;, tag=&amp;#039;span&amp;#039;})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function p.ref(frame)&lt;br /&gt;
	return p._ref(getArgs(frame), nil, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._sum(args, frame)&lt;br /&gt;
	--implements {{Sum RFC}}&lt;br /&gt;
	if not frame then frame = mw.getCurrentFrame() end&lt;br /&gt;
	if not isblank(args[1]) then&lt;br /&gt;
		local rfc = tonumber(args[1])&lt;br /&gt;
		if rfc then&lt;br /&gt;
			local db = &amp;#039;Template:Ref RFC/db/&amp;#039; .. math.floor(rfc/100)&lt;br /&gt;
			local dbContent = mw.title.new(db).content&lt;br /&gt;
			if dbContent then&lt;br /&gt;
				local titleContent = mw.ustring.match(dbContent, sectionMatch(rfc, &amp;#039;title&amp;#039;))&lt;br /&gt;
				if titleContent then&lt;br /&gt;
					return summary(args, dbContent, frame)&lt;br /&gt;
				else&lt;br /&gt;
					local errMsg = &amp;#039;Reference for RFC&amp;#039; .. rfc .. &amp;#039; is not defined yet.&amp;#039;&lt;br /&gt;
					return err({errMsg}) .. &amp;#039; You are invited to add it [[&amp;#039; .. db .. &amp;#039;|here]].&amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				local errMsg = &amp;#039;Reference for RFC&amp;#039; .. rfc .. &amp;#039; is not defined yet.&amp;#039;&lt;br /&gt;
				return err({errMsg}) .. &amp;#039; You are invited to add it [[Template:Ref RFC/db|here]].&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			local errMsg = &amp;#039;Parameter error in {{[[Template:Sum RFC|Sum RFC]]}}: &amp;quot;&amp;#039; .. args[1] .. &amp;#039;&amp;quot; is not a number.&amp;#039;&lt;br /&gt;
			return err({message = errMsg, style = &amp;#039;font-size:inherit&amp;#039;, tag=&amp;#039;span&amp;#039;})&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		local errMsg = &amp;#039;Parameter error in {{[[Template:Sum RFC|Sum RFC]]}}: Missing [[RFC (identifier)|RFC]].&amp;#039;&lt;br /&gt;
		return err({message = errMsg, style = &amp;#039;font-size:inherit&amp;#039;, tag=&amp;#039;span&amp;#039;})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function p.sum(frame)&lt;br /&gt;
	return p._sum(getArgs(frame), frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wiki&gt;Dandorid</name></author>
	</entry>
</feed>