Module:Unsigned

local p = {} p.unsigned = function( f ) local args = require( 'Module:ProcessArgs' ).norm( f.args or f ) local type = args.type or 'Unsigned' local user = args.user local date = args.date if date and not date:find( '%(UTC%)$' ) then date = date .. ' (UTC)' end local nowiki = '' if mw.isSubsting then nowiki = ' ' end local text = { ' –Preceding ' .. mw.ustring.lower( type ) .. ' comment was added', '. Please sign your posts with ' .. nowiki .. ' '	}	if date then table.insert( text, 2, ' at ' .. date ) end if user then local userLinks if not user:find( '[^:%x%.%d]' ) and require( 'Module:IPAddress' ).isIP( user ) then userLinks = '' .. user .. ' (talk)' else userLinks = '' .. user .. ' (talk • contribs)' end table.insert( text, 2, ' by ' .. userLinks ) end if mw.isSubsting then -- Don't allow substitution with missing required arg if type == 'Unsigned' and not user then local dateArg = '' if date then dateArg = '||' .. date end return '' elseif type == 'Undated' and not date then return '' end else if type == 'Unsigned' and not user then table.insert( text, '' ) elseif type == 'Undated' and not date then table.insert( text, '' ) end table.insert( text, '' ) end return table.concat( text ) end return p