Skip to content

Commit

Permalink
Switch to {{socklist}} in SPI report (#1509)
Browse files Browse the repository at this point in the history
* Switch to {{socklist}} in SPI report

Makes it easier for people to add more sox after the report is filed, and allows for a working set of tools links. Templates/modules do all of the heavy lifting. See https://en.wikipedia.org/wiki/Template_talk:SPI_report#Proposed_change_to_sock_list.

* fix lint error
  • Loading branch information
TamzinHadasa committed Feb 17, 2022
1 parent 65130d4 commit fc2a365
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/twinklearv.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,10 @@ Twinkle.arv.processSock = function(params) {
Morebits.wiki.addCheckpoint(); // prevent notification events from causing an erronous "action completed"

// prepare the SPI report
var text = '\n{{subst:SPI report|socksraw=' +
params.sockpuppets.map(function(v) {
return '* {{' + (mw.util.isIPAddress(v, true) ? 'checkip' : 'checkuser') + '|1=' + v + '}}';
}).join('\n') + '\n|evidence=' + params.evidence + ' \n';
var text = '\n{{subst:SPI report|' +
params.sockpuppets.map(function(sock, index) {
return (index + 1) + '=' + sock;
}).join('|') + '\n|evidence=' + params.evidence + ' \n';

if (params.checkuser) {
text += '|checkuser=yes';
Expand Down

0 comments on commit fc2a365

Please sign in to comment.