|
|
| /* Проверяем правки в основном пространстве имен */
| |
| equals_to_any(page_namespace, 0) & | | equals_to_any(page_namespace, 0) & |
| ( | | ( |
| /* Ищем строки с параметром facebook, содержащим любой вариант URL | | /* Define patterns for each platform's URL format */ |
| (?:www\\.)? - опциональный www
| | social_pattern := "\\|\\s*(?:facebook|x|vk|instagram|threads|tiktok|reddit|telegram|myspace|linkedin|xing)\\s*=\\s*(?:https?://)?(?:www\\.)?(?:facebook\\.com/|x\\.com/|vk\\.com/|instagram\\.com/|threads\\.net/@|tiktok\\.com/@|reddit\\.com/user/|t\\.me/s/|myspace\\.com/|linkedin\\.com/in/|xing\\.com/profile/)[^\\|\\}]+"; |
| https?:// - поддержка как http, так и https */
| |
| fb_pattern := "\\|\\s*facebook\\s*=\\s*(?:https?://)?(?:www\\.)?facebook\\.com/[^\\|\\}]+"; | |
| | | |
| /* Проверяем добавленные строки на наличие некорректного формата */ | | youtube_pattern := "\\|\\s*youtube(?:channel|-handle)?\\s*=\\s*(?:https?://)?(?:www\\.)?youtube\\.com/(?:user/|channel/|@)[^\\|\\}]+"; |
| added_lines rlike fb_pattern &
| |
| | | |
| /* Исключаем откаты и действия ботов */ | | media_pattern := "\\|\\s*(?:soundcloud|mixcloud)\\s*=\\s*(?:https?://)?(?:www\\.)?(?:soundcloud\\.com/|mixcloud\\.com/)[^\\|\\}]+"; |
| | |
| | model_pattern := "\\|\\s*(?:modelmayhem|onemodelplace|starnow)\\s*=\\s*(?:https?://)?(?:www\\.)?(?:modelmayhem\\.com/|onemodelplace\\.com/models/|starnow\\.com/)[^\\|\\}]+"; |
| | |
| | image_pattern := "\\|\\s*(?:flickr|foursquare|pinterest|photobucket)\\s*=\\s*(?:https?://)?(?:www\\.)?(?:flickr\\.com/people/|foursquare\\.com/|pinterest\\.com/|photobucket\\.com/user/)[^\\|\\}]+"; |
| | |
| | stream_pattern := "\\|\\s*(?:twitch|patreon)\\s*=\\s*(?:https?://)?(?:www\\.)?(?:twitch\\.tv/|patreon\\.com/)[^\\|\\}]+"; |
| | |
| | /* Check added lines against all patterns */ |
| | added_lines rlike social_pattern | |
| | added_lines rlike youtube_pattern | |
| | added_lines rlike media_pattern | |
| | added_lines rlike model_pattern | |
| | added_lines rlike image_pattern | |
| | added_lines rlike stream_pattern & |
| | |
| | /* Exclude bots and reverts */ |
| !("bot" in user_groups) & | | !("bot" in user_groups) & |
| !(summary rlike "^(?:revert|rv|undid)") & | | !(summary rlike "^(?:revert|rv|undid)") & |
| | | |
| /* Исключаем шаблоны удаления и подобные служебные шаблоны */ | | /* Exclude deletion templates */ |
| !(added_lines rlike "\\{\\{(db[\\-\\|]|delete\\||sd\\||speedy deletion)") | | !(added_lines rlike "\\{\\{(db[\\-\\|]|delete\\||sd\\||speedy deletion)") |
| ) | | ) |