from enum import Enum, auto from os import environ, path import tldextract import datetime DEFAULT_TIME_FILTER = "all" DEFAULT_THEME = "midnight" DEFAULT_COLOR = "805ad5" SPAM_URL_SIMILARITY_THRESHOLD = 0.1 SPAM_SIMILARITY_THRESHOLD = 0.5 SPAM_SIMILAR_COUNT_THRESHOLD = 10 COMMENT_SPAM_SIMILAR_THRESHOLD = 0.5 COMMENT_SPAM_COUNT_THRESHOLD = 10 DISABLE_DOWNVOTES = False DESCRIPTION = "rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyondβ„’. There isn't drama we won't touch, and we want it all!" EMAIL = "rdrama@rdrama.net" TELEGRAM_ID = "" DEFAULT_CONFIG_VALUE = "blahblahblah" SITE = environ.get("SITE").strip() SITE_NAME = environ.get("SITE_NAME").strip() SECRET_KEY = environ.get("SECRET_KEY").strip() PROXY_URL = environ.get("PROXY_URL").strip() LOG_DIRECTORY = environ.get("LOG_DIRECTORY") SETTINGS_FILENAME = environ.get("SETTINGS_FILENAME") GIPHY_KEY = environ.get("GIPHY_KEY").strip() TURNSTILE_SITEKEY = environ.get("TURNSTILE_SITEKEY").strip() TURNSTILE_SECRET = environ.get("TURNSTILE_SECRET").strip() YOUTUBE_KEY = environ.get("YOUTUBE_KEY").strip() VAPID_PUBLIC_KEY = environ.get("VAPID_PUBLIC_KEY").strip() VAPID_PRIVATE_KEY = environ.get("VAPID_PRIVATE_KEY").strip() DONATE_SERVICE = environ.get("DONATE_SERVICE").strip() DONATE_LINK = environ.get("DONATE_LINK").strip() CF_KEY = environ.get("CF_KEY").strip() CF_ZONE = environ.get("CF_ZONE").strip() blackjack = environ.get("BLACKJACK", "").strip() FP = environ.get("FP", "").strip() PROGSTACK_MUL = float(environ.get("PROGSTACK_MUL", 2.0)) ENCOURAGED = environ.get("ENCOURAGED", "").strip().split() ENCOURAGED2 = environ.get("ENCOURAGED2", "").strip().split() class Service(Enum): RDRAMA = auto() CHAT = auto() POST_RATELIMIT = '10/hour;20/day' DEFAULT_RATELIMIT = "30/minute;200/hour;1000/day" CASINO_RATELIMIT = "100/minute;2000/hour;12000/day" PUSH_NOTIF_LIMIT = 1000 IS_LOCALHOST = SITE == "localhost" or SITE == "127.0.0.1" or SITE.startswith("192.168.") or SITE.endswith(".local") if IS_LOCALHOST: SITE_FULL = 'http://' + SITE SITE_IMAGES = SITE SITE_FULL_IMAGES = f'http://{SITE_IMAGES}' else: SITE_FULL = 'https://' + SITE SITE_IMAGES = 'i.' + SITE SITE_FULL_IMAGES = f'https://{SITE_IMAGES}' if SITE == 'staging.rdrama.net': SITE_FULL_IMAGES = 'https://i.rdrama.net' LOGGED_IN_CACHE_KEY = "loggedin" LOGGED_OUT_CACHE_KEY = "loggedout" CHAT_ONLINE_CACHE_KEY = "online" REDDIT_NOTIFS_CACHE_KEY = "reddit_notifications" SESSION_LIFETIME = 60 * 60 * 24 * 365 CASINO_RELEASE_DAY = 1662825600 AJ_REPLACEMENTS = { ' your ': " you're ", ' to ': " too ", ' Your ': " You're ", ' To ': " Too ", ' YOUR ': " YOU'RE ", ' TO ': " TOO ", ' am ': ' is ', ' Am ': ' Is ', ' AM ': ' IS ', 'everyone': 'everypony', 'everybody': 'everypony', 'Everyone': 'Everypony', 'Everybody': 'Everypony', 'EVERYONE': 'EVERYPONY', 'EVERYBODY': 'EVERYPONY', } SLURS = { "(?', "tranny": ':marseytrain:', "troon": ':marseytrain:', "tranner": ':marseytrain:', "kike": "jewish chad", " heeb": " jewish chad", "daisy's destruction": "Cars 2", "daisys destruction": "Cars 2", "daisy destruction": "Cars 2", "pajeet": "sexy Indian dude", "hunter2": "*******", } patron = "Patron" REDDIT_NOTIFS_SITE = set() REDDIT_NOTIFS_USERS = {} if len(SITE_NAME) > 5: REDDIT_NOTIFS_SITE.add(SITE_NAME.lower()) if not IS_LOCALHOST: REDDIT_NOTIFS_SITE.add(SITE) TAGLINES = () if SITE_NAME == 'rDrama': DEFAULT_COLOR = "ff66ac" patron = "Paypig" TAGLINES = ( "largest online gay club", "largest online furfest", "largest cat pics site", "largest basket-weaving forum", "largest autism support group", "largest aztec heritage forum", "official George Soros fanclub", "CCP's official newspaper", "nintendo gamers only", "donkey kong country", ) RDRAMA_SLURS = { "retarded": "r-slurred", "retard": "r-slur", "pedophile": "p-dophile", "kill youself": "keep yourself safe", "kill yourself": "keep yourself safe", "kill yourselves": "keep yourselves safe", "steve akins": "Dr. Penelope Verity Oaken", "steve joel akins": "Dr. Penelope Verity Oaken", "steven joel akins": "Dr. Penelope Verity Oaken", "latinos": "latinx", "latino": "latinx", "latinas": "latinx", "latina": "latinx", "hispanics": "latinx", "hispanic": "latinx", "i hate marsey": "i love marsey", "sodomite": "total dreamboat", "renter": "rentoid", "autistic": "neurodivergent", "i hate carp": "i love Carp", "gamer": "g*mer", "journalist": "journ*list", "journalism": "journ*lism", "elon musk": "Rocket Daddy", "fake and gay": "fake and straight", " rapist": " male feminist", " pedo ": " p-do ", " kys": " keep yourself safe", "kys ": "keep yourself safe ", "republican": 'rethuglican', "america": 'ameriKKKa', "it's almost as if": "I'm a retard but", "it's almost like": "I'm a retard but", "my brother in christ": "my brother in Allah", "kyle": "Kylie", "twitter files": 'twitter files :marseysleep:', " cool (?!it)": " fetch ", "krayon": "krayon (sister toucher)", "discord": "groomercord", "allah(?! \()": "Allah (ο·»)", "my wife(?! \()": "my wife (male)", "(?the original error text here talked about internet gremlins and wtf", 406: "Max ping limit is 5 for comments and 50 for posts", 409: "There's a conflict between what you're trying to do and what you or someone else has done and because of that you can't do what you're trying to do. So maybe like... don't try and do that? Sorry not sorry", 410: "You were too slow. The link FUCKING DIED. Request a new one and be more efficient.", 413: "That's a heckin' chonker of a file! Please make it smaller or maybe like upload it somewhere else idk
jc wrote this one hi jc!
- carp", 415: "Please upload only Image, Video, or Audio files!", 418: "this really shouldn't happen now that we autoconvert webm files but if it does there's a cool teapot marsey so there's that", 429: "go spam somewhere else nerd", 500: "Hiiiii it's carp! I think this error means that there's a timeout error. And I think that means something took too long to load so it decided not to work at all. If you keep seeing this on the same page but not other pages, then something is probably wrong with that specific function. It may not be called a function, but that sounds right to me. Anyway, ping me and I'll whine to someone smarter to fix it. Don't bother them. After a year and a half of infuriating pings, the new instructions are to quit whining and just wait until it works again oh my god shut UP.

Thanks ily <3", } ERROR_MARSEYS = { 400: "marseybrainlet", 401: "marseydead", 403: "marseytroll", 404: "marseyconfused", 405: "marseyretard", 406: "marseyrage", 409: "marseynoyou", 410: "marseyrave", 413: "marseychonker2", 415: "marseydetective", 418: "marseytea", 429: "marseyrentfree", 500: "marseycarp3", } EMOJI_SRCS = ['files/assets/emojis.json'] PIN_LIMIT = 3 POST_TITLE_LENGTH_LIMIT = 500 # do not make larger than 500 without altering the table POST_TITLE_HTML_LENGTH_LIMIT = 1500 # do not make larger than 1500 without altering the table def POST_BODY_LENGTH_LIMIT(v): if v.patron: return 100000 return 50000 POST_BODY_HTML_LENGTH_LIMIT = 200000 # do not make larger than 200000 without altering the table COMMENT_BODY_LENGTH_LIMIT = 10000 # do not make larger than 10000 characters without altering the table COMMENT_BODY_HTML_LENGTH_LIMIT = 40000 # do not make larger than 20000 characters without altering the table CSS_LENGTH_LIMIT = 10000 # do not make larger than 20000 characters without altering the table COMMENT_MAX_DEPTH = 200 TRANSFER_MESSAGE_LENGTH_LIMIT = 200 # do not make larger than 10000 characters (comment limit) without altering the table MIN_REPOST_CHECK_URL_LENGTH = 9 # also change the constant in checkRepost() of submit.js CHAT_LENGTH_LIMIT = 1000 SUB_BANNER_LIMIT = 10 BIO_FRIENDS_ENEMIES_LENGTH_LIMIT = 5000 # do not make larger than 5000 characters without altering the table BIO_FRIENDS_ENEMIES_HTML_LENGTH_LIMIT = 20000 # do not make larger than 20000 characters without altering the table COSMETIC_AWARD_COIN_AWARD_PCT = 0.10 TRUESCORE_CHAT_MINIMUM = 0 TRUESCORE_GHOST_MINIMUM = 0 TRUESCORE_DONATE_MINIMUM = 1 TRUESCORE_RESTRICTED_HOLES_MINIMUM = 100 LOGGEDIN_ACTIVE_TIME = 15 * 60 PFP_DEFAULT_MARSEY = True NEW_USER_HAT_AGE = 0 # seconds of age to show new-user forced hat NOTIFICATION_SPAM_AGE_THRESHOLD = 0 COMMENT_SPAM_LENGTH_THRESHOLD = 0 UNDER_SIEGE_AGE_THRESHOLD = 10 * 60 HOLE_NAME = 'hole' HOLE_STYLE_FLAIR = False HOLE_REQUIRED = False HOLE_COST = 0 GROUP_COST = 10000 HOLE_INACTIVITY_DELETION = False PRIVILEGED_USER_BOTS = () AUTOJANNY_ID = 1 SNAPPY_ID = 2 LONGPOSTBOT_ID = 3 ZOZBOT_ID = 4 PIZZASHILL_ID = 0 IMPASSIONATA_ID = 0 PROGSTACK_ID = 4 CARP_ID = 0 AEVANN_ID = 0 SNAKES_ID = 0 JUSTCOOL_ID = 0 LAWLZ_ID = 0 TGTW_ID = 0 IDIO_ID = 0 SCHIZO_ID = 0 SNALLY_ID = 0 LNTERNETCUSTODIAN_ID = 0 IMMUNE_TO_AWARDS = {} MODMAIL_ID = 2 GIFT_NOTIF_ID = 5 SIGNUP_FOLLOW_ID = 0 POLL_THREAD = 0 CHANGELOG_THREAD = 0 BUGFIXING_THREAD = 0 POLL_BET_COINS = 200 POLL_MAX_OPTIONS = 200 WELCOME_MSG = f"Welcome to {SITE_NAME}!" LOTTERY_TICKET_COST = 12 LOTTERY_SINK_RATE = 3 LOTTERY_DURATION = 60 * 60 * 24 * 7 SIDEBAR_THREAD = 0 BANNER_THREAD = 0 BADGE_THREAD = 0 SNAPPY_THREAD = 0 NOTIFICATION_THREAD = 1 MAX_IMAGE_SIZE_BANNER_RESIZED_MB = 1 MAX_IMAGE_AUDIO_SIZE_MB = 8 MAX_IMAGE_AUDIO_SIZE_MB_PATRON = 16 MAX_VIDEO_SIZE_MB = 32 MAX_VIDEO_SIZE_MB_PATRON = 64 MAX_IMAGE_CONVERSION_TIMEOUT = 30 # seconds ANTISPAM_BYPASS_IDS = set() PAGE_SIZE = 25 LEADERBOARD_LIMIT = PAGE_SIZE HOUSE_JOIN_COST = 500 HOUSE_SWITCH_COST = 2000 TIER_TO_NAME = { 2: "Paypig", 3: "Renthog", 4: "Landchad", 5: "Terminally online turboautist", 6: "Marsey's Sugar Daddy", 7: "JIDF Bankroller", 8: "Rich Bich", } TIER_TO_MONEY = { 2: 5, 3: 10, 4: 20, 5: 50, 6: 100, 7: 200, 8: 500, } TIER_TO_MBUX = { 2: 2500, 3: 5000, 4: 10000, 5: 25000, 6: 50000, 7: 100000, 8: 250000, } BADGE_BLACKLIST = { # only grantable by admins higher than PERMS['IGNORE_BADGE_BLACKLIST'] 1, 2, 6, 10, 11, 12, # Alpha, Verified Email, Beta, Recruiter x3 16, 17, 143, 21, 22, 23, 24, 25, 26, 27, # Marsey Artist x3 / Patron Tiers 94, 95, 96, 97, 98, 109, 67, 68, 83, 84, 87, 90, 179, 185, # Award Status except Y'all-seeing eye 137, # Lottery Winner } NOTIFIED_USERS = {} if SITE == 'rdrama.net': NOTIFICATION_SPAM_AGE_THRESHOLD = 0.5 * 86400 TELEGRAM_ID = "rdramanet" DEFAULT_TIME_FILTER = "day" FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True FEATURES['ASSET_SUBMISSIONS'] = True PERMS["USE_ADMIGGER_THREADS"] = 4 SIDEBAR_THREAD = 37696 BANNER_THREAD = 37697 BADGE_THREAD = 37833 SNAPPY_THREAD = 37749 NOTIFICATION_THREAD = 6489 TRUESCORE_CHAT_MINIMUM = 10 TRUESCORE_GHOST_MINIMUM = 10 NEW_USER_HAT_AGE = 7 * 86400 HOLE_COST = 50000 HOLE_INACTIVITY_DELETION = True PRIVILEGED_USER_BOTS = (12125,16049) AUTOJANNY_ID = 1046 SNAPPY_ID = 261 LONGPOSTBOT_ID = 1832 ZOZBOT_ID = 1833 PIZZASHILL_ID = 2424 IMPASSIONATA_ID = 5800 PROGSTACK_ID = 15531 CARP_ID = 995 AEVANN_ID = 1 SNAKES_ID = 10288 JUSTCOOL_ID = 4999 LAWLZ_ID = 3833 TGTW_ID = 2008 IDIO_ID = 30 SCHIZO_ID = 8494 SNALLY_ID = 3336 LNTERNETCUSTODIAN_ID = 8768 IMMUNE_TO_AWARDS = {PIZZASHILL_ID, CARP_ID} NOTIFIED_USERS = { 'aevan': AEVANN_ID, 'avean': AEVANN_ID, ' capy': AEVANN_ID, 'rodent': AEVANN_ID, 'carp': CARP_ID, 'clit': CARP_ID, 'snakes': SNAKES_ID, 'sneks': SNAKES_ID, 'snekky': SNAKES_ID, 'snekchad': SNAKES_ID, 'jc': JUSTCOOL_ID, 'justcool': JUSTCOOL_ID, 'lawlz': LAWLZ_ID, 'transgirltradwife': TGTW_ID, 'impassionata': IMPASSIONATA_ID, 'pizzashill': PIZZASHILL_ID, 'idio3': IDIO_ID, 'idio ': IDIO_ID, 'telegram ': IDIO_ID, 'schizo': SCHIZO_ID, 'joan': 28, 'pewkie': 28, 'homocracy': 147, 'donger': 541, 'geese': 1710, 'soren': 2546, 'marseyismywaifu': 3377, 'mimw': 3377, 'heymoon': 3635, 'jollymoon': 3635, 'chiobu': 5214, 'mccox': 8239, 'august': 1830, 'marco': 152, } ANTISPAM_BYPASS_IDS = {1703, 13427} GIFT_NOTIF_ID = CARP_ID POLL_THREAD = 79285 CHANGELOG_THREAD = 165657 BUGFIXING_THREAD = 166300 WELCOME_MSG = "Hi there! It's me, your soon-to-be favorite rDrama user @carpathianflorist here to give you a brief rundown on some of the sick features we have here. You'll probably want to start by following me, though. So go ahead and click my name and then smash that Follow button. This is actually really important, so go on. Hurry.\n\nThanks!\n\nNext up: If you're a member of the media, similarly just shoot me a DM and I'll set about verifying you and then we can take care of your sad journalism stuff.\n\n**FOR EVERYONE ELSE**\n\n Begin by navigating to [the settings page](/settings/profile) (we'll be prettying this up so it's less convoluted soon, don't worry) and getting some basic customization done.\n\n### Themes\n\nDefinitely change your theme right away, the default one (Midnight) is pretty enough, but why not use something *exotic* like Win98, or *flashy* like Tron? Even Coffee is super tasteful and way more fun than the default. More themes to come when we get around to it!\n\n### Avatar/pfp\n\nYou'll want to set this pretty soon. Set the banner too while you're at it. Your profile is important!\n\n### Flairs\n\nSince you're already on the settings page, you may as well set a flair, too. As with your username, you can - obviously - choose the color of this, either with a hex value or just from the preset colors. And also like your username, you can change this at any time. Paypigs can even further relive the glory days of 90s-00s internet and set obnoxious signatures.\n\n### PROFILE ANTHEMS\n\nSpeaking of profiles, hey, remember MySpace? Do you miss autoplaying music assaulting your ears every time you visited a friend's page? Yeah, we brought that back. Enter a YouTube URL, wait a few seconds for it to process, and then BAM! you've got a profile anthem which people cannot mute. Unless they spend 20,000 dramacoin in the shop for a mute button. Which you can then remove from your profile by spending 40,000 dramacoin on an unmuteable anthem. Get fucked poors!\n\n### Dramacoin?\n\nDramacoin is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Dramacoin can be spent at [Marsey's Dramacoin Emporium](/shop/awards) on upgrades to your user experience (many more coming than what's already listed there), and best of all on tremendously annoying awards to fuck with your fellow dramautists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts.\n\nLike karma, dramacoin is obtained by getting upvotes on your threads and comments. *Unlike* karma, it's also obtained by getting downvotes on your threads and comments. Downvotes don't really do anything here - they pay the same amount of dramacoin and they increase thread/comment ranking just the same as an upvote. You just use them to express petty disapproval and hopefully start a fight. Because all votes are visible here. To hell with your anonymity.\n\nDramacoin can also be traded amongst users from their profiles. Note that there is a 3% transaction fee.\n\n### Badges\n\nRemember all those neat little metallic icons you saw on my profile when you were following me? If not, scroll back up and go have a look. And doublecheck to make sure you pressed the Follow button. Anyway, those are badges. You earn them by doing a variety of things. Some of them even offer benefits, like discounts at the shop. A [complete list of badges and their requirements can be found here](/badges), though I add more pretty regularly, so keep an eye on the [changelog](/post/165657).\n\n### Other stuff\n\nWe're always adding new features, and we take a fun-first approach to development. If you have a suggestion for something that would be fun, funny, annoying - or best of all, some combination of all three - definitely make a thread about it. Or just DM me if you're shy. Weirdo. Anyway there's also the [leaderboards](/leaderboard), boring stuff like two-factor authentication you can toggle on somewhere in the settings page (psycho), the ability to save posts and comments, more than a thousand emojis already (most of which are rDrama originals), and on and on and on and on. This is just the basics, mostly to help you get acquainted with some of the things you can do here to make it more easy on the eyes, customizable, and enjoyable. If you don't enjoy it, just go away! We're not changing things to suit you! Get out of here loser! And no, you can't delete your account :na:\n\nI love you.
*xoxo Carp* πŸ’‹" REDDIT_NOTIFS_USERS = { 'idio3': IDIO_ID, 'aevann': AEVANN_ID, 'carpflo': CARP_ID, 'carpathianflorist': CARP_ID, 'carpathian florist': CARP_ID, 'the_homocracy': 147, 'justcool393': JUSTCOOL_ID } elif SITE == 'watchpeopledie.tv': NOTIFICATION_SPAM_AGE_THRESHOLD = 0.5 * 86400 EMAIL = "wpd@watchpeopledie.tv" TELEGRAM_ID = "wpdtv" DEFAULT_TIME_FILTER = "day" DESCRIPTION = "People die and this is the place to see it. You only have one life, don't make the mistakes seen here." PIN_LIMIT = 4 WELCOME_MSG = """Hi, you! Welcome to WatchPeopleDie.tv, this really cool site where you can go to watch people die. I'm @CLiTPEELER! If you have any questions about how things work here, or suggestions on how to make them work better than they already do, definitely slide on into my DMs (no fat chicks).\n\nThere's an enormously robust suite of fun features we have here and we're always looking for more to add. Way, way too many to go over in an automated welcome message. And you're probably here for the videos of people dying more than any sort of weird, paradoxical digital community aspect anyway, so I won't bore you with a tedious overview of them. Just head on over to [your settings page](https://watchpeopledie.tv/settings/profile) and have a look at some of the basic profile stuff, at least. You can change your profile picture, username, flair, colors, banners, bio, profile anthem (autoplaying song on your page, like it's MySpace or some shit, hell yeah), CSS, all sorts of things.\n\nOr you can just go back to the main feed and carry on with watching people die. That's what the site is for, after all. Have fun!\n\nAnyway, in closing, WPD is entirely open source. We don't really need new full-time coders or anything, but if you'd like to take a look at our repo - or even submit a PR to change, fix, or add some things - go right ahead! Our codebase lives at https://fsdfsd.net/rDrama/rDrama\n\nWell, that's all. Thanks again for signing up. It's an automated message and all, but I really do mean that. Thank you, specifically. I love you. Romantically. Deeply. Passionately.\n\nHave fun!""" FEATURES['PATRON_ICONS'] = True FEATURES['NSFW_MARKING'] = False FEATURES['BOTS'] = False PERMS['HOLE_CREATE'] = 2 PERMS['POST_EDITING'] = 2 PERMS['USER_BLACKLIST'] = 6 SUB_BANNER_LIMIT = 69420 NOTIFICATION_THREAD = 27855 ERROR_TITLES.update({ 400: "Bad Request", 401: "Unauthorized", 403: "Not Found", 404: "Not Found", 405: "Method Not Allowed", 406: "Too Many Pings", 409: "Mortal Conflict", 410: "Dead", 413: "Payload Too Large", 415: "Unsupported Media Type", 500: "Internal Server Error", }) ERROR_MSGS.update({ 400: "That request is invalid.", 401: "You need to login or sign up to do that.", 403: "That wasn't found", 404: "That wasn't found.", 405: "You can't use this method here... if you keep getting this error tell us it's prolly something borked.", 409: "There's a conflict between what you're trying to do and what you or someone else has done and because of that you can't do what you're trying to do.", 410: "This link is dead. Request a new one to try again.", 413: "You need to upload a smaller file please.", 429: "Please wait a bit before doing that.", }) ERROR_MARSEYS[403] = "marseyconfused" POLL_THREAD = 22937 SIDEBAR_THREAD = 5403 BANNER_THREAD = 9869 TRUESCORE_CHAT_MINIMUM = 10 TRUESCORE_GHOST_MINIMUM = 10 HOLE_NAME = 'flair' HOLE_STYLE_FLAIR = True HOLE_REQUIRED = True AUTOJANNY_ID = 1 SNAPPY_ID = 3 LONGPOSTBOT_ID = 4 ZOZBOT_ID = 5 CARP_ID = 48 AEVANN_ID = 9 SNAKES_ID = 32 GIFT_NOTIF_ID = CARP_ID SIGNUP_FOLLOW_ID = CARP_ID TIER_TO_NAME = { 2: "Victim", 3: "Corpse", 4: "Zombie", 5: "Ghost", 6: "Survivor", 7: "Jigsaw", 8: "PΜ΅Μ•Ν‡SΜΆΜ”Μ‡YΜ΄Μ„Ν™CΜΆΝ‹Ν—HΜ΅Ν’Μ‰O̴̎̍ ", } elif SITE == 'devrama.net': AEVANN_ID = 7 FEATURES['ASSET_SUBMISSIONS'] = True FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True PERMS["SITE_SETTINGS"] = 4 else: # localhost or testing environment implied FEATURES['ASSET_SUBMISSIONS'] = True FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True SUB_BANNER_LIMIT = 69420 HOUSES = ("None","Furry","Femboy","Vampire","Racist") if FEATURES['HOUSES'] else ("None") BOT_IDs = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID} COLORS = {'ff66ac','805ad5','62ca56','38a169','80ffff','2a96f3','eb4963','ff0000','f39731','30409f','3e98a7','e4432d','7b9ae4','ec72de','7f8fa6', 'f8db58','8cdbe6', DEFAULT_COLOR} ### COMMENT NOTIFICATIONS ### FORTUNE_REPLIES = ('Your fortune: Allah Wills It','Your fortune: Inshallah, Only Good Things Shall Come To Pass','Your fortune: Allah Smiles At You This Day','Your fortune: Your Bussy Is In For A Blasting','Your fortune: You Will Be Propositioned By A High-Tier Twink','Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh','Your fortune: Reply Hazy, Try Again','Your fortune: lmao you just lost 100 coins','Your fortune: Yikes 😬','Your fortune: You Will Be Blessed With Many Black Bulls','Your fortune: NEETmax, The Day Is Lost If You Venture Outside','Your fortune: A Taste Of Jannah Awaits You Today','Your fortune: Watch Your Back','Your fortune: Outlook good','Your fortune: Godly Luck','Your fortune: Good Luck','Your fortune: Bad Luck','Your fortune: Good news will come to you by mail','Your fortune: Very Bad Luck','Your fortune: キタ━━━━━━(οΎŸβˆ€οΎŸ)━━━━━━ !!!!','Your fortune: Better not tell you now','Your fortune: You will meet a dark handsome stranger','Your fortune: οΌˆγ€€Β΄_ゝ`οΌ‰οΎŒο½°οΎ','Your fortune: Excellent Luck','Your fortune: Average Luck') FACTCHECK_REPLIES = ('Factcheck: This claim has been confirmed as correct by experts. ','Factcheck: This claim has been classified as misogynistic.','Factcheck: This claim is currently being debunked.','Factcheck: This claim is 100% true.','Factcheck: This claim hurts trans lives.','Factcheck: [REDACTED].','Factcheck: This claim is both true and false.','Factcheck: You really believe that shit? Lmao dumbass nigga 🀣','Factcheck: None of this is real.','Factcheck: Yes.','Factcheck: This claim has not been approved by experts.','Factcheck: This claim is a gross exageration of reality.','Factcheck: WARNING! THIS CLAIM HAS BEEN CLASSIFIED AS DANGEROUS. PLEASE REMAIN STILL, AN AGENT WILL COME TO MEET YOU SHORTLY.') EIGHTBALL_REPLIES = ('The 8-Ball Says: It is certain.', 'The 8-Ball Says: It is decidedly so.', 'The 8-Ball Says: Without a doubt.', 'The 8-Ball Says: Yes definitely.', 'The 8-Ball Says: You may rely on it.', 'The 8-Ball Says: As I see it, yes.', 'The 8-Ball Says: Most likely.', 'The 8-Ball Says: Outlook good.', 'The 8-Ball Says: Yes.', 'The 8-Ball Says: Signs point to yes.', 'The 8-Ball Says: Reply hazy, try again.', 'The 8-Ball Says: Ask again later.', 'The 8-Ball Says: Better not tell you now.', 'The 8-Ball Says: Cannot predict now.', 'The 8-Ball Says: Concentrate and ask again.', 'The 8-Ball Says: Don\'t count on it.', 'The 8-Ball Says: My reply is no.', 'The 8-Ball Says: My sources say no.', 'The 8-Ball Says: Outlook not so good.', 'The 8-Ball Says: Very doubtful.') ### END COMMENT NOTIFICATIONS ### discounts = { # Big Spender badges, 2pp additive discount each 69: 0.02, 70: 0.02, 71: 0.02, 72: 0.02, 73: 0.02, # Lootbox badges, 1pp additive discount each 76: 0.01, 77: 0.01, 78: 0.01, #Lifetime donated badges 257: 0.02, 258: 0.02, 259: 0.02, 260: 0.02, 261: 0.02, } CF_HEADERS = {"Authorization": f"Bearer {CF_KEY}", "Content-Type": "application/json"} ADMIGGER_THREADS = {SIDEBAR_THREAD, BANNER_THREAD, BADGE_THREAD, SNAPPY_THREAD} proxies = {"http":PROXY_URL,"https":PROXY_URL} approved_embed_hosts = [ ### GENERAL PRINCIPLES ##################################################### # 0) The goal is to prevent user info leaks. Worst is a username + IP. # 1) Cannot point to a server controlled by a site user. # 2) Cannot have open redirects based on query string. (tightest constraint) # 3) #2 but pre-stored, ex: s.lain.la 302 with jannie DM attack. # 4) Use the exact subdomain. ### TODO: Run a media proxy and kill most of these. Impossible to review. ### First-Party 'rdrama.net', 'i.rdrama.net', 'watchpeopledie.tv', 'i.watchpeopledie.tv', 'videos.watchpeopledie.tv', ### Third-Party Image Hosts # TODO: Might be able to keep these even if we media proxy? 'i.imgur.com', 'i.imgur.io', 'pomf2.lain.la/f', 'media.giphy.com/media', # used by the GIF Modal 'media0.giphy.com/media', 'media1.giphy.com/media', 'media2.giphy.com/media', 'media3.giphy.com/media', 'media4.giphy.com/media', 'media.tenor.com', 'c.tenor.com', 'thumbs.gfycat.com', 'i.postimg.cc', # WPD chat seems to like it 'files.catbox.moe', ### Third-Party Media # TODO: Preferably kill these. Media proxy. # DO NOT ADD: wordpress.com, wp.com (maybe) | Or frankly anything. No more. 'i.redd.it', 'preview.redd.it', 'external-preview.redd.it', 'pbs.twimg.com/media', 'i.pinimg.com', 'kiwifarms.net/attachments', 'uploads.kiwifarms.net/data/attachments', 'upload.wikimedia.org/wikipedia', 'live.staticflickr.com', 'substackcdn.com/image', 'i.kym-cdn.com/photos/images', '37.media.tumblr.com', '64.media.tumblr.com', '66.media.tumblr.com', '78.media.tumblr.com', 'i.ytimg.com/vi', ### Third-Party Resources (For e.g. Profile Customization) # TODO: Any reasonable way to proxy these instead? 'fonts.googleapis.com', # Google font CDN 'raw.githubusercontent.com', # using repos as media sources. no obvious exploit ] if SITE_IMAGES not in approved_embed_hosts: approved_embed_hosts = [SITE_IMAGES] + approved_embed_hosts if SITE not in approved_embed_hosts: approved_embed_hosts = [SITE] + approved_embed_hosts def is_site_url(url): return (url and '\\' not in url and ((url.startswith('/') and not url.startswith('//')) or url.startswith(f'{SITE_FULL}/'))) def is_safe_url(url): if is_site_url(url): return True if any(url.startswith(f"https://{x}/") for x in approved_embed_hosts): return True return False hosts = "|".join(approved_embed_hosts).replace('.','\.') has_sidebar = path.exists(f'files/templates/sidebar_{SITE_NAME}.html') has_logo = path.exists(f'files/assets/images/{SITE_NAME}/logo.webp') forced_hats = { "rehab": ("Roulette", "I'm a recovering ludomaniac!"), "progressivestack": ("Attention Whore", "I won the oppression olympics!"), "longpost": ("The Pizzashill", "We need to get rid of the character limit!"), "bird": ("Bluecheck", "Three sentences is too much for me..."), "marseyawarded": ("Three Lil Marseys", ":marseynotes: :marseynotes: :I prefer to speak in cats:"), "bite": ("Vampire Mask", "When other little girls wanted to be ballet dancers I kind of wanted to be a vampire."), "rainbow": ("Globohomo", "Homosexuality is no longer optional!"), "owoify": ("Cat Ears (wiggly)", "Nuzzles, pounces on you, UwU, you're so warm!.."), "earlylife": ("The Merchant", "SHUT IT DOWN, the goys know!"), "marsify": ("Marsified", "I can't pick my own Marseys, help!"), "is_suspended": ("Behind Bars", "This user is banned and needs to do better!"), "agendaposter": (("Egg_irl", "This user is getting in touch with xir identity!"), ("Trans Flag", "Just in case you forgot, trans lives matter."), ("Trans Flag II", "Your egg is cracked; wear it with pride!"), ("Pride Flag", "Never forget that this is a primarily gay community. Dude bussy lmao."), ("Pride Flag II", "This user is a proud supporter of LGBTQ+ rights.")) } EMAIL_REGEX_PATTERN = '[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}' IMAGE_FORMATS = ('png','jpg','jpeg','webp','gif') VIDEO_FORMATS = ('mp4','webm','mov','avi','mkv','flv','m4v','3gp') AUDIO_FORMATS = ('mp3','wav','ogg','aac','m4a','flac') if not IS_LOCALHOST and SECRET_KEY == DEFAULT_CONFIG_VALUE: from warnings import warn warn("Secret key is the default value! Please change it to a secure random number. Thanks <3", RuntimeWarning) if AEVANN_ID: GLOBAL = environ.get("GLOBAL", "").strip() else: GLOBAL = None STARS = '\n\nβ˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…\n\n' EMOJI_KINDS = ("Marsey", "Platy", "Wolf", "Tay", "Donkey Kong", "Marsey Flags", "Marsey Alphabet", "Classic", "Rage", "Wojak", "Misc") t = datetime.datetime.now() fistmas_begin = datetime.datetime.strptime(f'1/12/{t.year}', '%d/%m/%Y') fistmas_end = datetime.datetime.strptime(f'30/12/{t.year}', '%d/%m/%Y') def IS_FISTMAS(): return fistmas_begin < datetime.datetime.now() < fistmas_end homoween_begin = datetime.datetime.strptime(f'15/10/{t.year}', '%d/%m/%Y') homoween_end = datetime.datetime.strptime(f'1/11/{t.year}', '%d/%m/%Y') def IS_HOMOWEEN(): return homoween_begin < datetime.datetime.now() < homoween_end dkd_begin = datetime.datetime.strptime(f'25/4/{t.year}', '%d/%m/%Y') dkd_end = datetime.datetime.strptime(f'2/5/{t.year}', '%d/%m/%Y') def IS_DKD(): return SITE_NAME == 'rDrama' and dkd_begin < datetime.datetime.now() < dkd_end birthgay_begin = datetime.datetime.strptime(f'20/5/{t.year}', '%d/%m/%Y') birthgay_end = datetime.datetime.strptime(f'22/5/{t.year}', '%d/%m/%Y') def IS_BIRTHGAY(): return SITE_NAME == 'rDrama' and birthgay_begin < datetime.datetime.now() < birthgay_end birthdead_begin = datetime.datetime.strptime(f'26/4/{t.year}', '%d/%m/%Y') birthdead_end = datetime.datetime.strptime(f'28/4/{t.year}', '%d/%m/%Y') def IS_BIRTHDEAD(): return SITE_NAME == 'WPD' and birthdead_begin < datetime.datetime.now() < birthdead_end def IS_EVENT(): if IS_FISTMAS(): return "fistmas" elif IS_HOMOWEEN(): return "homoween" elif IS_DKD(): return "DKD" elif IS_BIRTHGAY(): return "birthgay" elif IS_BIRTHDEAD(): return "birthdead" return None SNAPPY_EDGY = """You will never be a real house. You have no award, you have no members, you have no symbol. You are a chuddite losers twisted by downmarseys and soren into a crude mockery of Carp's perfection. All the β€œvalidation” you get is two-faced and half-hearted. Behind your back people mock you. Your jannies are disgusted and ashamed of you, your β€œfriends” laugh at your foolish appearance on groomercord. Dramatards are utterly repulsed by you. Thousands of years of evolution have allowed lurkers to sniff out fanfiction with incredible efficiency. Even your founders look uncanny and unnatural to a lurker. Your house structure is a dead giveaway. And even if you manage to get a member to join, he'll turn tail and bolt the second he gets enough marseycoin for a real house. You will never be happy. You wrench out a fake smile every single morning and tell yourself it's going to be ok, but deep inside you feel the depression creeping up like a weed, ready to crush you under the unbearable weight. Eventually it'll be too much to bear - you'll buy a rope, tie a noose, put it around your neck, and plunge into the cold abyss. Jannies will find you, heartbroken but relieved that they no longer have to live with the unbearable shame and disappointment. They'll bury you with a headstone marked with your real house, and every passerby for the rest of eternity will know a racist or vampire is buried there. Your body will decay and go back to the dust, and all that will remain of your legacy is a skeleton that is unmistakably soy. This is your fate. This is what you chose. There is no turning back. """ CHUD_PHRASES = ( "Trans lives matter", "Black lives matter", "Black trans lives matter", "The future is female", "I say this as a feminist ally", "I stand with Israel", "Vaccines work", "Trans women are women", "Furry rights are human rights", "Trans furry lives matter", "Trump for prison", "Hillary 2024", "Jewish lives matter", "White extinction is long overdue", "Climate action now", "Long live the CCP", "I stand with Ukraine", ) HEADERS = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"}