User:MusikBot II/FixPP

base_protection_templates
The bot's ability to handle all types of protection templates depends on it knowing what the core templates are, from which it collects all of their redirects. The base_protection_templates hash specifies each of these templates, none of which are redirects, and their type of protection. For example, pp-semi-BLP redirects to pp-blp, and pertains only to edit protection, as opposed to pp-move which pertains to move protection.

There is, or should only be, a single template that can represent multiple types of protection, which is pp. For this, the corresponding value in the hash is an empty string. If another key is added to the has with an empty string value it will be treated and parsed the same way pp is. Note many templates redirect here, such as pp-protected.

This set of templates and their types should very rarely change. It should more or less match the table at Template:Protection templates, with some important exceptions.



Some protection templates are deliberately left out. These include:
 * permanently protected and temporarily protected – These are edge cases and are used on talk pages that are not themselves protected, rather the accompanying subject page is protected. The bot is not programmed to try to fix invalid usage of these templates.
 * pp-office, pp-reset, pp-office-dmca – These are added by WMF staff as office actions. Removing the templates even after the protection has expired should not be left to the bot.
 * pp-main-page, mprotected2, etc – These are added as a result of the pages being transcluded on the Main Page. Another bot automates adding and removing these.