|
|
− | /* variable filter1 contains words that should not appear, within a word or otherwise */
| + | edit_delta < 250 & |
− | filter1:="(beastiality|bio?tch|bastard|faget|tits|[wp][e3]n[li\!][5s]|v[a@]gina|fuck|ass(goblin|bandit|hat|c[lr]own|(w?hole|lick(er)?|wipe)\s)";
| + | !("confirmed" in user_groups) & |
| + | page_namespace == 0 & ( |
| + | dick_name := "\bDick('s\s\p{L}\p{Ll}|(,?\s(and|&))?\s\p{Lu}[\p{Ll}.])|\b(\p{Lu}(\p{Ll}+|\.)?(,?\s(and|&))?|[DM]r\.)\sDicks?\b|\b(first|last|author|given|surname)(\d*(-?link)?|-?link\d*)?\s*=\s*Dicks?\b|{{\s*[Ss]ortname\s*\|\s*Dicks?\s*\|"; |
| | | |
− | /* variable filter2 contains words that should not appear standalone */
| + | !(summary irlike "und(id|o)|\brv[vt]?\b|revert") & ( |
− | filter2:="(?<!\w)(n(e|i)g(g|)(a|er|ro)\s|fuk\s|fart(ing|\s|)|va(j|g)\s|rap(e|ist)(ing|s|d|r|)|bunghole\s|twat\s|blue( |)waffle\s|puss(a|)(y|ies)|perv(ing|)|shat|pimp|chode(stroker)\s|sperm|semen|hooker\s|prostitute\s|pubic( |)hair|boner\s|chode\s)(?!\w)";
| + | bad_word := "\b(?:ass|butt)\s?holes?\b(?!\Wsurfer)|\b(?:dumb|(?:f|ph)at+(?:est)?)\s*a(?:ss|\$\$)\b|bitch(?!\"? magazine)|\bcock(?:s?|sucker)\b|\bdick(?:sucker|head)?s?\b|cuck(?:|s|er|ing)\b|\bcunts?\b|\bdildo|douche|f(?:u|v)ck|nigg(?:er|ah*)|p(?:a|e|ae)do(?:f|ph)il|fag(?:g[aio]t)?\b|penis(?!ton|i)|\bcrap(?:py)?\b|\bslut\b|whore|\b(?:bull|dog|horse)?shit(?:hole|s|ti?er|t?y|t?ing)?\b|\bblah\b|\bpuss(?!ycat|y Riot)a?y|\bidiot\b|(?<!\bit )(?<!\bthat )\bwas here\b|\blol\b|(?:[asdfghjkl;]\s*){30}|\!{10,}"; |
| | | |
− | /* Not for autoconfirmed */
| + | added_lines irlike bad_word & |
− | (!("autoconfirmed" in user_groups))
| + | !(added_lines rlike dick_name) & |
− | | + | !(removed_lines irlike (bad_word + "|\w\*{1,4}\w")) & |
− | /* prevent filtered words from being added to text */
| + | !((page_title + "\n" + added_links) irlike bad_word) & |
− | &(((lcase(added_lines) rlike filter1) | (lcase(added_lines) rlike filter2)
| + | !(page_title irlike "discography") & |
− | & !((lcase(removed_lines) rlike filter1) | (lcase(removed_lines) rlike filter2)))
| + | !(str_replace(new_wikitext, "==", "\x01") irlike ("\x01.*(?:songs|singles|track list(?:ing)?|albums|discography).*\x01[^\x01]*(?:" + bad_word + ")")) |
− | | + | ) |
− | /* prevent articles from being created which contain filtered words */
| + | ) |
− | | (article_recent_contributors=="" & ((lcase(article_text) rlike filter1) | (lcase(article_text) rlike filter2))
| |
− | | |
− | /* prevent summaries containing such words */
| |
− | | lcase(summary) rlike filter1 | lcase(summary) rlike filter2) | |
− | | |
− | /* prevent page moves to titles containing filtered words */
| |
− | | (action=="move" & ((lcase(moved_to_text) rlike filter1) | (lcase(moved_to_text) rlike filter2))) | |
− | | |
− | /* prevent user accounts from being created which contain filtered words */
| |
− | | (action=="createaccount" & ((lcase(user_name) rlike filter1) | (lcase(user_name) rlike filter2))))
| |
− | | |
− | /* allow action if the word was there before for some reason */
| |
− | & !((lcase(removed_lines) rlike filter1) | (lcase(removed_lines) rlike filter2))
| |