Module:AIV

require('Module:LoadLib')(_G)

local p = {} local results = { ['checking'] = { image = 'Pictogram voting wait blue.svg', text = 'Checking.', },	['warned'] = { image = 'Pictogram voting wait.svg.png', text = 'Warned user.', },	['inactive'] = { image = 'Pictogram voting wait orange.svg.png', text = 'Insufficient recent activity to warrant a block.', },	['stopped'] = { image = 'Pictogram voting wait red.svg.png', text = 'No vandalism since final warning.', afterText = 'Re-report if this user resumes vandalising.', },	['stopwarned'] = { image = 'Pictogram voting wait red.svg.png', text = 'No edits since being warned.', afterText = 'Re-report if this user continues vandalising or spamming after sufficient warnings', },	['stalewarn'] = { image = 'Stalewarning.svg.png', text = 'Stale warning.', },	['notblock'] = { image = 'Pictogram voting comment.png', text = 'Not Blockable.', },	['monitor'] = { image = 'Pictogram voting wait green.svg.png', text = 'Will actively monitor user.', },	['question'] = { image = 'Pictogram voting question-blue.svg.png', text = 'Question: ', },	['note'] = { image = 'Pictogram voting comment.png', text = '', },	['indef'] = { image = 'User-blocked-icon.png.png', text = '', },	['sharedip'] = { image = 'Pictogram voting comment.png', text = '', },	['onlywarn'] = { image = 'Pictogram voting oppose.svg.png', text = '', },	['declined'] = { image = 'Pictogram voting oppose.svg.png', text = '', },	['nowarn'] = { image = 'Pictogram voting oppose.svg.png', text = '', },	['notvandal'] = { image = 'Pictogram voting oppose.svg.png', text = '', },	['protected'] = { image = 'Pictogram voting Novote.png', text = '', },	['deleted'] = { image = 'Pictogram voting delete.svg.png', text = '', },	['commentdeleted'] = { image = 'Pictogram voting delete.svg.png', text = '', },	['stale'] = { image = 'Time2wait.svg.png', text = '', },	['nowstale'] = { image = 'Time2wait.svg.png', text = '', },	['block'] = { image = 'User-blocked-icon.png', text = '', },	['falsepositive'] = { image = 'Pictogram voting oppose.svg.png', text = '', }, }

local aliases = { ['chk'] = 'checking', ['check'] = 'checking', ['check'] = 'checking', ['chk'] = 'checking',

['w'] = 'warned', ['warned'] = 'warned', ['warn'] = 'warned',

['i'] = 'inactive', ['inactive'] = 'inactive', ['old'] = 'inactive', ['ins'] = 'inactive',

['f'] = 'stopped', ['stopped'] = 'stopped', ['stop'] = 'stopped', ['nfw'] = 'stopped',

['nesw'] = 'stopwarned', ['stopwarned'] = 'stopwarned',

['ow'] = 'stalewarn', ['stalewarn'] = 'stalewarn', ['oldwarn'] = 'stalewarn',

['nb'] = 'notblock', ['notblock'] = 'notblock', ['not blockable'] = 'notblock',

['m'] = 'monitor', ['mon'] = 'monitor', ['monitor'] = 'monitor',

['q'] = 'question', ['question'] = 'question', ['ques'] = 'question',

['n'] = 'note', ['cmt'] = 'note', ['comment'] = 'note', ['note'] = 'note',

['in'] = 'indef', ['indef'] = 'indef', ['indefinite'] = 'indef',

['s'] = 'sharedip', ['sharedip'] = 'sharedip', ['shared'] = 'sharedip',

['4im'] = 'onlywarn', ['onlywarn'] = 'onlywarn',

['dc'] = 'declined', ['declined'] = 'declined', ['den'] = 'declined', ['d'] = 'declined', ['denied'] = 'declined', ['n'] = 'declined', ['no'] = 'declined', ['not'] = 'declined',

['ns'] = 'nowarn', ['nw'] = 'nowarn', ['nowarn'] = 'nowarn', ['nofinal'] = 'nowarn', ['nowarns'] = 'nowarn', ['new'] = 'nowarn',

['nv'] = 'notvandal', ['notvandal'] = 'notvandal',

['p'] = 'protected', ['protected'] = 'protected',

['d'] = 'deleted', ['deleted'] = 'deleted', ['del'] = 'deleted',

['cd'] = 'commentdeleted', ['commentdel'] = 'commentdeleted', ['commdel'] = 'commentdeleted', ['commentdeleted'] = 'commentdeleted',

['sa'] = 'stale', ['st'] = 'stale', ['stale'] = 'stale',

['sn'] = 'nowstale', ['nowstale'] = 'nowstale',

['b'] = 'block', ['block'] = 'block', ['done'] = 'block', ['blocked'] = 'block',

['fp'] = 'falsepositive', ['false'] = 'falsepositive', ['falsepositive'] = 'falsepositive', }

- -- Template: AIV -- -- Creates report reply text for HSW:AN. - function p.main(frame) local ret = {} local args = getArgs(frame) for i, v in forEachArgs('string', unpack(table.from(args))) do		key, text = string.unpackedSplit(v, '%s*,%s*') key = assertTrue(aliases[key], 'invalid notice key %q at argument #%d', 2, key, i)		local data = results[key] table.push(ret, table.concat{			string.makeImage(data.image, { size=20, link= }),			string.bold(data.text, 'b'),			data.afterText and ' ' or ,			data.afterText or ,			text and ' ' or ,			text or '',		}) end return table.concat(ret, ' ') end

return p