{"action":"created","issue":{"url":"https://api.github.com/repos/azatoth/twinkle/issues/259","labels_url":"https://api.github.com/repos/azatoth/twinkle/issues/259/labels{/name}","comments_url":"https://api.github.com/repos/azatoth/twinkle/issues/259/comments","events_url":"https://api.github.com/repos/azatoth/twinkle/issues/259/events","html_url":"https://github.com/azatoth/twinkle/issues/259","id":59005470,"number":259,"title":"Implementing blocking tools for admins","user":{"login":"MusikAnimal","id":366374,"avatar_url":"https://avatars.githubusercontent.com/u/366374?v=3","gravatar_id":"","url":"https://api.github.com/users/MusikAnimal","html_url":"https://github.com/MusikAnimal","followers_url":"https://api.github.com/users/MusikAnimal/followers","following_url":"https://api.github.com/users/MusikAnimal/following{/other_user}","gists_url":"https://api.github.com/users/MusikAnimal/gists{/gist_id}","starred_url":"https://api.github.com/users/MusikAnimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MusikAnimal/subscriptions","organizations_url":"https://api.github.com/users/MusikAnimal/orgs","repos_url":"https://api.github.com/users/MusikAnimal/repos","events_url":"https://api.github.com/users/MusikAnimal/events{/privacy}","received_events_url":"https://api.github.com/users/MusikAnimal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/azatoth/twinkle/labels/Feature%20request","name":"Feature request","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-26T02:00:15Z","updated_at":"2015-03-13T00:55:40Z","closed_at":null,"body":"Hi, I'm a big JS programmer (my profession, actually), and admin on enwiki. I wrote [spamublock.js](https://en.wikipedia.org/wiki/User:MusikAnimal/spamublock.js) which is great for what it is, but there's tons of other common blocks I make daily, like vandalism-only and NOTHERE, etc.\r\n\r\nSo I got to thinking. Instead of writing a new script, design and implementing a GUI from scratch, why don't I try to add this functionality to Twinkle? I've talked with some admins on #wikipedia-en-admins and they agreed an addition like this would be a long time coming. Any thoughts? I'm willing to put a lot of work into this and make this happen. Thanks!"},"comment":{"url":"https://api.github.com/repos/azatoth/twinkle/issues/comments/78723388","html_url":"https://github.com/azatoth/twinkle/issues/259#issuecomment-78723388","issue_url":"https://api.github.com/repos/azatoth/twinkle/issues/259","id":78723388,"user":{"login":"MusikAnimal","id":366374,"avatar_url":"https://avatars.githubusercontent.com/u/366374?v=3","gravatar_id":"","url":"https://api.github.com/users/MusikAnimal","html_url":"https://github.com/MusikAnimal","followers_url":"https://api.github.com/users/MusikAnimal/followers","following_url":"https://api.github.com/users/MusikAnimal/following{/other_user}","gists_url":"https://api.github.com/users/MusikAnimal/gists{/gist_id}","starred_url":"https://api.github.com/users/MusikAnimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MusikAnimal/subscriptions","organizations_url":"https://api.github.com/users/MusikAnimal/orgs","repos_url":"https://api.github.com/users/MusikAnimal/repos","events_url":"https://api.github.com/users/MusikAnimal/events{/privacy}","received_events_url":"https://api.github.com/users/MusikAnimal/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T00:55:40Z","updated_at":"2015-03-13T00:55:40Z","body":"Okay, two weeks and a couple hundred testwiki edits later, we have a working block module! In summary, it can block, reblock, and issue block templates on the user's talk page. Unblocking is not yet supported, but I plan to get to that. Other features are in store as well, but let's focus on what we've got.\r\n\r\nThe data for block templates was moved from the warn module to the block module, but the warn module is used to actually issue the warning, and also previewing the templates. I also cleaned up some of the code in the warn module, most of it solely for block module integration.\r\n\r\nThe templates were also grouped together, although differing from MediaWiki:Ipbreason-dropdown. We could go back and forth about grouping, but I think the way I've put it makes it very easy to find what you want, the options within each group sorted alphabetically. The \"common block reasons\" are what's _truly_ the most common, as in the ones admins use every day. I hope others agree with the sorting, in practice I think this will be a very welcomed change.\r\n\r\nTo summarize changes to the existing warn module:\r\n~ Block templates moved to block module, grouped by popularity / type and sorted alphabetically\r\n~ Some of the defaults for the block templates were changed. For instance, {{uw-spoablock}} or \"sockpuppetry\" does not enforce an indefinite expiry, as we usually don't indef the sockmaster.\r\n~ Added more block templates\r\n\r\nI'm surely missing lots of things, and obviously there's lots of testing in store here. I guess let me know anything I can do to improve on the technical side / Twinkle conventions, then when we're ready I could post at [[WP:VPT]] asking for testers/feedback.\r\n\r\nPull request: https://github.com/azatoth/twinkle/pull/260\r\n\r\nBlock module is enabled by default for sysops using dev version of Twinkle on testwiki. I've been blocking User:Example. I'm not sure about IPs, I can only assume there's a some safe IP range we can use for testing."}}