diff --git a/files/classes/submission.py b/files/classes/submission.py index a95298b80..603b06e96 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -451,7 +451,6 @@ class Submission(Base): def realtitle(self, v): if self.club and not (v and (v.paid_dues or v.id == self.author_id)): if v: return random.choice(TROLLTITLES).format(username=v.username) - elif SITE == 'cringetopia.org': return f'Please make an account to see this post' else: return f'{CC} MEMBERS ONLY' elif self.title_html: title = self.title_html else: title = self.title diff --git a/files/classes/user.py b/files/classes/user.py index 9af7c5be5..fe23287bf 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -28,11 +28,6 @@ cardview = bool(int(environ.get("CARD_VIEW", 1))) class User(Base): __tablename__ = "users" - - if SITE == "pcmemes.net": - basedcount = Column(Integer, default=0) - pills = deferred(Column(String, default="")) - id = Column(Integer, primary_key=True) username = Column(String) namecolor = Column(String, default=DEFAULT_COLOR) diff --git a/files/helpers/const.py b/files/helpers/const.py index 2fff24a26..c3e73cd6e 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -13,8 +13,7 @@ if SITE == "localhost": SITE_FULL = 'http://' + SITE else: SITE_FULL = 'https://' + SITE -if SITE == 'pcmemes.net': CC = "SPLASH MOUNTAIN" -else: CC = "COUNTRY CLUB" +CC = "COUNTRY CLUB" CC_TITLE = CC.title() AJ_REPLACEMENTS = { @@ -28,86 +27,66 @@ AJ_REPLACEMENTS = { ' TO ': " TOO ", } -if SITE_NAME == 'Cringetopia': - SLURS = { - "retarded": "neurodivergent", - "retard": "neurodivergent", - "faggotry": "cute twinkry", - "faggot": "cute twink", - "n1gger": "πŸ€", - "nlgger": "πŸ€", - "nigger": "πŸ€", - "uss liberty incident": "tragic accident aboard the USS Liberty", - "lavon affair": "Lavon Misunderstanding", - "i hate marsey": "i love marsey", - "autistic": "neurodivergent", - "holohoax": "i tried to claim the Holocaust didn't happen because I am a pencil-dicked imbecile and the word filter caught me lol", - "i hate carp": "i love Carp", - "heil hitler": "hello kitty", +SLURS = { + "retarded": "r-slurred", + "retard": "r-slur", + "gayfag": "gaystrag", + "poorfag": "poorstrag", + "richfag": "richstrag", + "newfag": "newstrag", + "oldfag": "oldstrag", + "faggotry": "cute twinkry", + "faggot": "cute twink", + "pedophile": "libertarian", + "kill yourself": "keep yourself safe", + "n1gger": "BIPOC", + "nlgger": "BIPOC", + "nigger": "BIPOC", + "steve akins": "penny verity oaken", + "trannie": "πŸš‚πŸšƒπŸšƒ", + "tranny": "πŸš‚πŸšƒπŸšƒ", + "troon": "πŸš‚πŸšƒπŸšƒ", + "nonewnormal": "HorseDewormerAddicts", + "kikery": "https://sciencedirect.com/science/article/abs/pii/S016028960600033X", + "kike": "https://sciencedirect.com/science/article/abs/pii/S016028960600033X", + "latinos": "latinx", + "latino": "latinx", + "latinas": "latinx", + "latina": "latinx", + "hispanics": "latinx", + "hispanic": "latinx", + "uss liberty incident": "tragic accident aboard the USS Liberty", + "lavon affair": "Lavon Misunderstanding", + "shylock": "Israeli friend", + "mohammad": "Prophet Mohammad (PBUH)", + "muhammad": "Prophet Mohammad (PBUH)", + "i hate marsey": "i love marsey", + "dancing israelis": "i love Israel", + "sodomite": "total dreamboat", + "pajeet": "sexy Indian dude", + "landlord": "landchad", + "tenant": "renthog", + "renter": "rentoid", + "autistic": "neurodivergent", + "holohoax": "i tried to claim the Holocaust didn't happen because I am a pencil-dicked imbecile and the word filter caught me lol", + "groomercord": "discord (actually a pretty cool service)", + "pedocord": "discord (actually a pretty cool service)", + "i hate carp": "i love Carp", + "manlet": "little king", + "gamer": "g*mer", + "journalist": "journ*list", + "journalism": "journ*lism", + "wuhan flu": "SARS-CoV-2 syndemic", + "china flu": "SARS-CoV-2 syndemic", + "china virus": "SARS-CoV-2 syndemic", + "kung flu": "SARS-CoV-2 syndemic", + "elon musk": "rocket daddy", + "fake and gay": "fake and straight", - " fag ": " cute twink ", - } -else: - SLURS = { - "retarded": "r-slurred", - "retard": "r-slur", - "gayfag": "gaystrag", - "poorfag": "poorstrag", - "richfag": "richstrag", - "newfag": "newstrag", - "oldfag": "oldstrag", - "faggotry": "cute twinkry", - "faggot": "cute twink", - "pedophile": "libertarian", - "kill yourself": "keep yourself safe", - "n1gger": "BIPOC", - "nlgger": "BIPOC", - "nigger": "BIPOC", - "steve akins": "penny verity oaken", - "trannie": "πŸš‚πŸšƒπŸšƒ", - "tranny": "πŸš‚πŸšƒπŸšƒ", - "troon": "πŸš‚πŸšƒπŸšƒ", - "nonewnormal": "HorseDewormerAddicts", - "kikery": "https://sciencedirect.com/science/article/abs/pii/S016028960600033X", - "kike": "https://sciencedirect.com/science/article/abs/pii/S016028960600033X", - "latinos": "latinx", - "latino": "latinx", - "latinas": "latinx", - "latina": "latinx", - "hispanics": "latinx", - "hispanic": "latinx", - "uss liberty incident": "tragic accident aboard the USS Liberty", - "lavon affair": "Lavon Misunderstanding", - "shylock": "Israeli friend", - "mohammad": "Prophet Mohammad (PBUH)", - "muhammad": "Prophet Mohammad (PBUH)", - "i hate marsey": "i love marsey", - "dancing israelis": "i love Israel", - "sodomite": "total dreamboat", - "pajeet": "sexy Indian dude", - "landlord": "landchad", - "tenant": "renthog", - "renter": "rentoid", - "autistic": "neurodivergent", - "holohoax": "i tried to claim the Holocaust didn't happen because I am a pencil-dicked imbecile and the word filter caught me lol", - "groomercord": "discord (actually a pretty cool service)", - "pedocord": "discord (actually a pretty cool service)", - "i hate carp": "i love Carp", - "manlet": "little king", - "gamer": "g*mer", - "journalist": "journ*list", - "journalism": "journ*lism", - "wuhan flu": "SARS-CoV-2 syndemic", - "china flu": "SARS-CoV-2 syndemic", - "china virus": "SARS-CoV-2 syndemic", - "kung flu": "SARS-CoV-2 syndemic", - "elon musk": "rocket daddy", - "fake and gay": "fake and straight", - - " rapist ": " male feminist ", - " pedo ": " libertarian ", - " kys ": " keep yourself safe ", - " fag ": " cute twink ", + " rapist ": " male feminist ", + " pedo ": " libertarian ", + " kys ": " keep yourself safe ", + " fag ": " cute twink ", } single_words = "|".join([slur.lower() for slur in SLURS.keys()]) @@ -119,156 +98,37 @@ AGENDAPOSTER_PHRASE = 'trans lives matter' AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically removed because you forgot to include `{AGENDAPOSTER_PHRASE}`.\n\nDon't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with `{AGENDAPOSTER_PHRASE}` included. \n\n*This is an automated message; if you need help, you can message us [here](/contact).*""" -if SITE in {'rdrama.net','devrama.xyz'}: - NOTIFICATIONS_ID = 1046 - AUTOJANNY_ID = 2360 - SNAPPY_ID = 261 - LONGPOSTBOT_ID = 1832 - ZOZBOT_ID = 1833 - AUTOPOLLER_ID = 6176 - AUTOBETTER_ID = 7668 - AUTOCHOICE_ID = 9167 - BASEDBOT_ID = 0 +NOTIFICATIONS_ID = 1 +AUTOJANNY_ID = 2 +SNAPPY_ID = 3 +LONGPOSTBOT_ID = 4 +ZOZBOT_ID = 5 +AUTOPOLLER_ID = 6 +AUTOBETTER_ID = 7 +AUTOCHOICE_ID = 8 +BASEDBOT_ID = 0 - A_ID = 1230 - KIPPY_ID = 7150 - GIFT_NOTIF_ID = 995 - PIZZASHILL_ID = 2424 - PIZZA_VOTERS = (747,1963,9712) - IDIO_ID = 30 - CARP_ID = 995 - JOAN_ID = 28 - MOOSE_ID = 1904 - AEVANN_ID = 1 - HOMO_ID = 147 - SOREN_ID = 2546 - Q_ID = 1480 - LAWLZ_ID = 3833 - LLM_ID = 253 - DAD_ID = 2513 - MOM_ID = 4588 - DONGER_ID = 541 - BUG_THREAD = 18459 - 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](https://marsey1.gumroad.com/l/tfcvri) 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) 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.\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* πŸ’‹" - ROLES={ - "owner": "864612849199480914", - "admin": "846509661288267776", - "linked": "890342909390520382", - "1": "868129042346414132", - "2": "875569477671067688", - "3": "869434199575236649", - "4": "868140288013664296", - "5": "947236580794450010", - "6": "947236351445725204", - "7": "886781932430565418", - } -elif SITE == "pcmemes.net": - NOTIFICATIONS_ID = 1046 - AUTOJANNY_ID = 1050 - SNAPPY_ID = 261 - LONGPOSTBOT_ID = 1832 - ZOZBOT_ID = 1833 - AUTOPOLLER_ID = 2129 - AUTOBETTER_ID = 1867 - AUTOCHOICE_ID = 2072 - BASEDBOT_ID = 800 - - A_ID = 0 - KIPPY_ID = 1592 - PIZZASHILL_ID = 0 - PIZZA_VOTERS = () - GIFT_NOTIF_ID = 1592 - IDIO_ID = 0 - CARP_ID = 0 - JOAN_ID = 0 - MOOSE_ID = 0 - AEVANN_ID = 1 - HOMO_ID = 0 - SOREN_ID = 0 - Q_ID = 0 - LAWLZ_ID = 0 - LLM_ID = 0 - DAD_ID = 0 - MOM_ID = 0 - DONGER_ID = 0 - BUG_THREAD = 4103 - WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)" - ROLES={} -elif SITE == 'cringetopia.org': - NOTIFICATIONS_ID = 1 - AUTOJANNY_ID = 2 - SNAPPY_ID = 3 - LONGPOSTBOT_ID = 4 - ZOZBOT_ID = 5 - AUTOPOLLER_ID = 6 - AUTOBETTER_ID = 7 - AUTOCHOICE_ID = 8 - BASEDBOT_ID = 0 - - A_ID = 0 - KIPPY_ID = 0 - GIFT_NOTIF_ID = 43 - PIZZASHILL_ID = 0 - PIZZA_VOTERS = () - IDIO_ID = 0 - CARP_ID = 43 - JOAN_ID = 0 - MOOSE_ID = 0 - AEVANN_ID = 9 - HOMO_ID = 0 - SOREN_ID = 0 - Q_ID = 0 - LAWLZ_ID = 0 - LLM_ID = 0 - DAD_ID = 0 - MOM_ID = 0 - DONGER_ID = 0 - BUG_THREAD = 0 - WELCOME_MSG = "Hi there! It's me, your soon-to-be favorite Cringetopia 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.\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 coins in the shop for a mute button. Which you can then remove from your profile by spending 40,000 coins on an unmuteable anthem. Get fucked poors!\n\n### Coins?\n\nCoins is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Coins can be spent at [Marsey's Dramacoin Emporium](/shop) 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 autists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts.\n\nLike karma, Coins 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 Coins 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\nCoins 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.\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, 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* πŸ’‹" - ROLES={ - "owner": "809580734578819072", - "admin": "846509661288267776", - "linked": "890342909390520382", - "1": "868129042346414132", - "2": "875569477671067688", - "3": "869434199575236649", - "4": "868140288013664296", - "5": "947236580794450010", - "6": "947236351445725204", - "7": "886781932430565418", - } -else: - NOTIFICATIONS_ID = 1 - AUTOJANNY_ID = 2 - SNAPPY_ID = 3 - LONGPOSTBOT_ID = 4 - ZOZBOT_ID = 5 - AUTOPOLLER_ID = 6 - AUTOBETTER_ID = 7 - AUTOCHOICE_ID = 8 - BASEDBOT_ID = 0 - - A_ID = 0 - KIPPY_ID = 0 - GIFT_NOTIF_ID = 9 - PIZZASHILL_ID = 0 - PIZZA_VOTERS = () - IDIO_ID = 0 - CARP_ID = 0 - JOAN_ID = 0 - MOOSE_ID = 0 - AEVANN_ID = 9 - HOMO_ID = 0 - SOREN_ID = 0 - Q_ID = 0 - LAWLZ_ID = 0 - LLM_ID = 0 - DAD_ID = 0 - MOM_ID = 0 - DONGER_ID = 0 - BUG_THREAD = 0 - WELCOME_MSG = f"Welcome to {SITE_NAME}!" - ROLES={} +A_ID = 0 +KIPPY_ID = 0 +GIFT_NOTIF_ID = 9 +PIZZASHILL_ID = 0 +PIZZA_VOTERS = () +IDIO_ID = 0 +CARP_ID = 0 +JOAN_ID = 0 +MOOSE_ID = 0 +AEVANN_ID = 9 +HOMO_ID = 0 +SOREN_ID = 0 +Q_ID = 0 +LAWLZ_ID = 0 +LLM_ID = 0 +DAD_ID = 0 +MOM_ID = 0 +DONGER_ID = 0 +BUG_THREAD = 0 +WELCOME_MSG = f"Welcome to {SITE_NAME}!" +ROLES={} IMGUR_KEY = environ.get("IMGUR_KEY").strip() PUSHER_ID = environ.get("PUSHER_ID", "").strip() @@ -615,39 +475,9 @@ AWARDS = { }, } -if SITE_NAME == 'PCM': - PCM_AWARDS = { - "croag": { - "kind": "croag", - "title": "Croag", - "description": "Summons Croag on the post.", - "icon": "fas fa-head-side", - "color": "text-gold", - "price": 500 - }, - "toe": { - "kind": "toe", - "title": "Toe Hype", - "description": "Summons Blade's toe on the post.", - "icon": "fas fa-socks", - "color": "text-blue", - "price": 500 - }, - "crab": { - "kind": "crab", - "title": "Crab", - "description": "Rave time!", - "icon": "fas fa-crab", - "color": "text-danger", - "price": 4000 - } - } - AWARDS = {**PCM_AWARDS, **AWARDS} - AWARDS2 = deepcopy(AWARDS) for k, val in AWARDS.items(): - if val['description'] == '???' and not (k == 'ghost' and SITE_NAME == 'PCM'): AWARDS2.pop(k) - if SITE == 'pcmemes.net' and k in ('ban','pizzashill','marsey','bird','grass','chud'): AWARDS2.pop(k) + if val['description'] == '???': AWARDS2.pop(k) AWARDS3 = {} @@ -682,8 +512,7 @@ NOTIFIED_USERS = { 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') -if SITE_NAME == 'rDrama': patron = 'Paypig' -else: patron = 'Patron' +patron = 'Patron' REDDIT_NOTIFS = { 'idio3': IDIO_ID, @@ -717,16 +546,10 @@ marseys_const = [x[0] for x in db.query(Marsey.name).filter(Marsey.name!='chudse marseys_const2 = marseys_const + ['chudsey','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','exclamationpoint','period','questionmark'] db.close() -if SITE_NAME == 'PCM': - valid_username_chars = 'a-zA-Z0-9_\-А-я' - valid_username_regex = re.compile("^[a-zA-Z0-9_\-А-я]{3,25}$", flags=re.A) - mention_regex = re.compile('(^|\s|

)@(([a-zA-Z0-9_\-А-я]){3,25})', flags=re.A) - mention_regex2 = re.compile('

@(([a-zA-Z0-9_\-А-я]){3,25})', flags=re.A) -else: - valid_username_chars = 'a-zA-Z0-9_\-' - valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A) - mention_regex = re.compile('(^|\s|

)@(([a-zA-Z0-9_\-]){1,25})', flags=re.A) - mention_regex2 = re.compile('

@(([a-zA-Z0-9_\-]){1,25})', flags=re.A) +valid_username_chars = 'a-zA-Z0-9_\-' +valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A) +mention_regex = re.compile('(^|\s|

)@(([a-zA-Z0-9_\-]){1,25})', flags=re.A) +mention_regex2 = re.compile('

@(([a-zA-Z0-9_\-]){1,25})', flags=re.A) valid_password_regex = re.compile("^.{8,100}$", flags=re.A) diff --git a/files/helpers/slots.py b/files/helpers/slots.py index c9083c49a..02ad2a874 100644 --- a/files/helpers/slots.py +++ b/files/helpers/slots.py @@ -4,8 +4,7 @@ from .const import * command_word = "!slots" casino_word = "!slotsmb" -if SITE_NAME == 'rDrama': minimum_bet = 100 -else: minimum_bet = 10 +minimum_bet = 10 maximum_bet = INFINITY payout_to_symbols = { 2: ["πŸ‘£", "πŸ€", "🌈", "⭐️"], diff --git a/files/routes/admin.py b/files/routes/admin.py index d1c2f5858..e00539d9f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -132,42 +132,6 @@ def merge_all(v, id): return redirect(user.url) - -if SITE_NAME == 'PCM': - @app.get('/admin/sidebar') - @admin_level_required(3) - def get_sidebar(v): - - try: - with open(f'files/templates/sidebar_{SITE_NAME}.html', 'r', encoding="utf-8") as f: sidebar = f.read() - except: - sidebar = None - - return render_template('admin/sidebar.html', v=v, sidebar=sidebar) - - - @app.post('/admin/sidebar') - @limiter.limit("1/second;30/minute;200/hour;1000/day") - @admin_level_required(3) - def post_sidebar(v): - - text = request.values.get('sidebar', '').strip() - - with open(f'files/templates/sidebar_{SITE_NAME}.html', 'w+', encoding="utf-8") as f: f.write(text) - - with open(f'files/templates/sidebar_{SITE_NAME}.html', 'r', encoding="utf-8") as f: sidebar = f.read() - - ma = ModAction( - kind="change_sidebar", - user_id=v.id, - ) - g.db.add(ma) - - g.db.commit() - - return render_template('admin/sidebar.html', v=v, sidebar=sidebar, msg='Sidebar edited successfully!') - - @app.post("/@/make_admin") @admin_level_required(3) def make_admin(v, username): @@ -401,8 +365,6 @@ def remove_meme_admin(v, username): @limiter.limit("1/day") @admin_level_required(3) def monthly(v): - if SITE_NAME == 'rDrama' and v.id != AEVANN_ID: abort (403) - data = {'access_token': GUMROAD_TOKEN} emails = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]] @@ -420,16 +382,6 @@ def monthly(v): send_repeatable_notification(u.id, f"@{v.username} has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).") else: print(u.username) - if request.host == 'pcmemes.net': - u = g.db.query(User).filter_by(id=KIPPY_ID).one() - u.procoins += 50000 - g.db.add(u) - - if request.host == 'rdrama.net': - u = g.db.query(User).filter_by(id=A_ID).one() - u.procoins += 25000 - g.db.add(u) - ma = ModAction( kind="monthly", user_id=v.id diff --git a/files/routes/awards.py b/files/routes/awards.py index 449f850ee..7e18745eb 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -597,8 +597,6 @@ def award_comment(cid, v): @app.get("/admin/awards") @admin_level_required(2) def admin_userawards_get(v): - if request.host == 'pcmemes.net' and v.admin_level < 3: abort(403) - if v.admin_level != 3: return render_template("admin/awards.html", awards=list(AWARDS3.values()), v=v) @@ -608,8 +606,6 @@ def admin_userawards_get(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) def admin_userawards_post(v): - if request.host == 'pcmemes.net' and v.admin_level < 3: abort(403) - try: u = request.values.get("username").strip() except: abort(404) diff --git a/files/routes/comments.py b/files/routes/comments.py index 2df0cbc40..4ccccc235 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -82,8 +82,6 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): if not pid: if comment.parent_submission: pid = comment.parent_submission - elif SITE_NAME == 'rDrama': pid = 6489 - elif request.host == 'pcmemes.net': pid = 2487 else: pid = 1 try: pid = int(pid) @@ -331,7 +329,7 @@ def api_comment(v): if parent.author.any_block_exists(v) and v.admin_level < 2: return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403 - is_bot = bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID) + is_bot = bool(request.headers.get("Authorization")) if '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and parent_post.id not in ADMIGGERS and not is_bot and not v.marseyawarded and AGENDAPOSTER_PHRASE not in body.lower() and len(body) > 10: now = int(time.time()) @@ -421,39 +419,6 @@ def api_comment(v): g.db.add(c_choice) - if request.host == 'pcmemes.net' and c.body.lower().startswith("based"): - pill = based_regex.match(body) - - if level == 1: basedguy = get_account(parent_post.author_id) - else: basedguy = get_account(c.parent_comment.author_id) - basedguy.basedcount += 1 - if pill: - if basedguy.pills: basedguy.pills += f", {pill.group(1)}" - else: basedguy.pills += f"{pill.group(1)}" - g.db.add(basedguy) - - body2 = f"@{basedguy.username}'s Based Count has increased by 1. Their Based Count is now {basedguy.basedcount}." - if basedguy.pills: body2 += f"\n\nPills: {basedguy.pills}" - - body_based_html = sanitize(body2) - - c_based = Comment(author_id=BASEDBOT_ID, - parent_submission=parent_submission, - distinguish_level=6, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body_html=body_based_html, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost - ) - - g.db.add(c_based) - g.db.flush() - - n = Notification(comment_id=c_based.id, user_id=v.id) - g.db.add(n) - if parent_post.id not in ADMIGGERS: if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower(): @@ -487,118 +452,6 @@ def api_comment(v): g.db.add(n) - if SITE_NAME == 'rDrama' and len(c.body) >= 1000 and "<" not in body and "" not in body_html: - - body = random.choice(LONGPOST_REPLIES) - - - if body.startswith('β–Ό'): - body = body[1:] - vote = CommentVote(user_id=LONGPOSTBOT_ID, - vote_type=-1, - comment_id=c.id, - real = True - ) - g.db.add(vote) - c.downvotes = 1 - - - - body_html2 = sanitize(body) - - c2 = Comment(author_id=LONGPOSTBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body_html=body_html2, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost - ) - - g.db.add(c2) - - longpostbot = g.db.query(User).filter_by(id = LONGPOSTBOT_ID).one_or_none() - longpostbot.comment_count += 1 - longpostbot.coins += 1 - g.db.add(longpostbot) - - g.db.flush() - - n = Notification(comment_id=c2.id, user_id=v.id) - g.db.add(n) - - - if SITE_NAME == 'rDrama' and random.random() < 0.001: - - body = "zoz" - body_html2 = sanitize(body) - - - - - c2 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body_html=body_html2, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost, - distinguish_level=6 - ) - - g.db.add(c2) - g.db.flush() - n = Notification(comment_id=c2.id, user_id=v.id) - g.db.add(n) - - - - - - body = "zle" - body_html2 = sanitize(body) - - - - c3 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c2.id, - level=level+2, - is_bot=True, - body_html=body_html2, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost, - distinguish_level=6 - ) - - g.db.add(c3) - g.db.flush() - - body = "zozzle" - body_html2 = sanitize(body) - - - c4 = Comment(author_id=ZOZBOT_ID, - parent_submission=parent_submission, - parent_comment_id=c3.id, - level=level+3, - is_bot=True, - body_html=body_html2, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost, - distinguish_level=6 - ) - - g.db.add(c4) - - zozbot = g.db.query(User).filter_by(id = ZOZBOT_ID).one_or_none() - zozbot.comment_count += 3 - zozbot.coins += 3 - g.db.add(zozbot) - - if not v.shadowbanned: notify_users = NOTIFY_USERS(body, v) diff --git a/files/routes/discord.py b/files/routes/discord.py index 2160e6ede..947176cf9 100644 --- a/files/routes/discord.py +++ b/files/routes/discord.py @@ -17,9 +17,6 @@ def join_discord(v): if v.shadowbanned: return {"error": "Internal server error"} - if SITE_NAME == 'rDrama' and v.admin_level < 2 and v.patron == 0 and v.truecoins < 150: - return "You must receive 150 upvotes/downvotes from other users before being able to join the Discord server." - now=int(time.time()) state=generate_hash(f"{now}+{v.id}+discord") diff --git a/files/routes/front.py b/files/routes/front.py index 1460124ee..2c572d691 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -176,11 +176,11 @@ def front_all(v, sub=None, subdomain=None): if v: defaultsorting = v.defaultsorting - if sub or SITE_NAME != 'rDrama': defaulttime = 'all' + defaulttime = 'all' else: defaulttime = v.defaulttime else: defaultsorting = "new" - if sub or SITE_NAME != 'rDrama': defaulttime = 'all' + defaulttime = 'all' else: defaulttime = defaulttimefilter sort=request.values.get("sort", defaultsorting) @@ -344,8 +344,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if not (v and v.shadowbanned): posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None) - if request.host == 'rdrama.net': num = 5 - else: num = 1 + num = 1 if sort == "hot": ti = int(time.time()) + 3600 diff --git a/files/routes/posts.py b/files/routes/posts.py index 94181cf52..e7212f3df 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -20,8 +20,7 @@ from shutil import copyfile from sys import stdout -if SITE_NAME == 'PCM': snappyquotes = [] -else: snappyquotes = [f':#{x}:' for x in marseys_const2] +snappyquotes = [f':#{x}:' for x in marseys_const2] if path.exists(f'snappy_{SITE_NAME}.txt'): with open(f'snappy_{SITE_NAME}.txt', "r", encoding="utf-8") as f: @@ -89,9 +88,7 @@ def publish(pid, v): cache.delete_memoized(frontlist) cache.delete_memoized(User.userpagelisting) - if SITE == 'cringetopia.org': - send_cringetopia_message(post.permalink) - elif v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()): + if v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()): send_discord_message(post.permalink) cache.delete_memoized(changeloglist) @@ -703,98 +700,6 @@ def thumbnail_thread(pid): db.add(post) db.commit() - if SITE_NAME == 'rDrama': - for t in ("submission","comment"): - word = random.choice(('rdrama','marsey')) - - try: - data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={word}&size=1', timeout=5).json()["data"] - except: break - - for i in data: - - if i["subreddit"] == 'PokemonGoRaids': continue - - body_html = f'''

New site mention: https://old.reddit.com{i["permalink"]}?context=89

''' - - existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, body_html=body_html).one_or_none() - if existing_comment: break - - new_comment = Comment(author_id=NOTIFICATIONS_ID, - parent_submission=None, - body_html=body_html, - distinguish_level=6 - ) - db.add(new_comment) - db.flush() - - new_comment.top_comment_id = new_comment.id - - - admins = db.query(User).filter(User.admin_level > 0).all() - for admin in admins: - notif = Notification(comment_id=new_comment.id, user_id=admin.id) - db.add(notif) - - k,val = random.choice(tuple(REDDIT_NOTIFS.items())) - - try: - data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={k}&size=1', timeout=5).json()["data"] - except: break - - for i in data: - - body_html = f'''

New mention of you: https://old.reddit.com{i["permalink"]}?context=89

''' - - existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None,body_html=body_html).one_or_none() - if existing_comment: break - - new_comment = Comment(author_id=NOTIFICATIONS_ID, - parent_submission=None, - body_html=body_html, - distinguish_level=6 - ) - - db.add(new_comment) - db.flush() - - new_comment.top_comment_id = new_comment.id - - - notif = Notification(comment_id=new_comment.id, user_id=val) - db.add(notif) - - - if SITE == 'pcmemes.net': - for t in ("submission","comment"): - - try: - data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q=pcmemes.net&size=1', timeout=5).json()["data"] - except: break - - for i in data: - body_html = f'''

New site mention: https://old.reddit.com{i["permalink"]}?context=89

''' - - existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, body_html=body_html).one_or_none() - - if existing_comment: break - - new_comment = Comment(author_id=NOTIFICATIONS_ID, - parent_submission=None, - body_html=body_html, - distinguish_level=6 - ) - db.add(new_comment) - db.flush() - - new_comment.top_comment_id = new_comment.id - - - admins = db.query(User).filter(User.admin_level > 2).all() - for admin in admins: - notif = Notification(comment_id=new_comment.id, user_id=admin.id) - db.add(notif) - db.commit() db.close() stdout.flush() @@ -1099,7 +1004,7 @@ def submit_post(v, sub=None): if embed and len(embed) > 1500: embed = None - is_bot = bool(request.headers.get("Authorization")) or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID) + is_bot = bool(request.headers.get("Authorization")) if request.values.get("ghost") and v.coins >= 100: v.coins -= 100 @@ -1274,9 +1179,7 @@ def submit_post(v, sub=None): cache.delete_memoized(frontlist) cache.delete_memoized(User.userpagelisting) - if SITE == 'cringetopia.org': - send_cringetopia_message(post.permalink) - elif v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()) and not post.private: + if v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()) and not post.private: send_discord_message(post.permalink) cache.delete_memoized(changeloglist) diff --git a/files/routes/static.py b/files/routes/static.py index 73d291ef2..7892ca06c 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -37,22 +37,13 @@ def logged_out(old = ""): @app.get("/marseys") @auth_required def marseys(v): - if SITE_NAME == 'rDrama': - marseys = g.db.query(Marsey, User).join(User, User.id==Marsey.author_id) - sort = request.values.get("sort", "usage") - if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username) - else: marseys = marseys.order_by(User.username, Marsey.count.desc()) - else: - marseys = g.db.query(Marsey).order_by(Marsey.count.desc()) + marseys = g.db.query(Marsey).order_by(Marsey.count.desc()) return render_template("marseys.html", v=v, marseys=marseys) @app.get("/marsey_list") @cache.memoize(timeout=600, make_name=make_name) def marsey_list(): - if SITE_NAME == 'rDrama': - marseys = [f"{x.name} : {y} {x.tags}" for x, y in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())] - else: - marseys = [f"{x.name} : {x.tags}" for x in g.db.query(Marsey).order_by(Marsey.count.desc())] + marseys = [f"{x.name} : {x.tags}" for x in g.db.query(Marsey).order_by(Marsey.count.desc())] return str(marseys).replace("'",'"') @@ -112,94 +103,6 @@ def participation_stats(v): "users who posted, commented, or voted in the past 7 days": len(active_users), } - - if SITE_NAME == 'rDrama': - furries1 = g.db.query(User.id).filter(User.house.like('Furry%')).count() - femboys1 = g.db.query(User.id).filter(User.house.like('Femboy%')).count() - vampires1 = g.db.query(User.id).filter(User.house.like('Vampire%')).count() - racists1 = g.db.query(User.id).filter(User.house.like('Racist%')).count() - - furries2 = g.db.query(func.sum(User.truecoins)).filter(User.house.like('Furry%')).scalar() - femboys2 = g.db.query(func.sum(User.truecoins)).filter(User.house.like('Femboy%')).scalar() - vampires2 = g.db.query(func.sum(User.truecoins)).filter(User.house.like('Vampire%')).scalar() - racists2 = g.db.query(func.sum(User.truecoins)).filter(User.house.like('Racist%')).scalar() - - stats2 = {"House furry members": furries1, - "House femboy members": femboys1, - "House vampire members": vampires1, - "House racist members": racists1, - "House furry total truescore": furries2, - "House femboy total truescore": femboys2, - "House vampire total truescore": vampires2, - "House racist total truescore": racists2, - } - - stats.update(stats2) - - ids = (NOTIFICATIONS_ID, AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID) - bots = g.db.query(User).filter(User.id.in_(ids)) - - for u in bots: - g.db.add(u) - - if u.patron_utc and u.patron_utc < time.time(): - u.patron = 0 - u.patron_utc = 0 - send_repeatable_notification(u.id, "Your paypig status has expired!") - if u.discord_id: remove_role(v, "1") - - if u.unban_utc and u.unban_utc < time.time(): - u.is_banned = 0 - u.unban_utc = 0 - u.ban_evade = 0 - send_repeatable_notification(u.id, "You have been unbanned!") - - if u.agendaposter and u.agendaposter < time.time(): - u.agendaposter = 0 - send_repeatable_notification(u.id, "Your chud theme has expired!") - badge = u.has_badge(28) - if badge: g.db.delete(badge) - - if u.flairchanged and u.flairchanged < time.time(): - u.flairchanged = None - send_repeatable_notification(u.id, "Your flair lock has expired. You can now change your flair!") - badge = u.has_badge(96) - if badge: g.db.delete(badge) - - if u.marseyawarded and u.marseyawarded < time.time(): - u.marseyawarded = None - send_repeatable_notification(u.id, "Your marsey award has expired!") - badge = u.has_badge(98) - if badge: g.db.delete(badge) - - if u.longpost and u.longpost < time.time(): - u.longpost = None - send_repeatable_notification(u.id, "Your pizzashill award has expired!") - badge = u.has_badge(97) - if badge: g.db.delete(badge) - - if u.bird and u.bird < time.time(): - u.bird = None - send_repeatable_notification(u.id, "Your bird site award has expired!") - badge = u.has_badge(95) - if badge: g.db.delete(badge) - - if u.progressivestack and u.progressivestack < time.time(): - u.progressivestack = None - send_repeatable_notification(u.id, "Your progressive stack has expired!") - badge = u.has_badge(94) - if badge: g.db.delete(badge) - - if u.rehab and u.rehab < time.time(): - u.rehab = None - send_repeatable_notification(u.id, "Your rehab has finished!") - badge = u.has_badge(109) - if badge: g.db.delete(badge) - - if u.deflector and u.deflector < time.time(): - u.deflector = None - send_repeatable_notification(u.id, "Your deflector has expired!") - g.db.commit() return render_template("admin/content_stats.html", v=v, title="Content Statistics", data=stats) diff --git a/files/routes/subs.py b/files/routes/subs.py index 98a0e3dea..d2e2e00b6 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -223,14 +223,10 @@ def remove_mod(v, sub): @app.get("/create_sub") @is_not_permabanned def create_sub(v): - if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403) - - if request.host == 'rdrama.net': cost = 0 - else: - num = v.subs_created + 1 - for a in v.alts: - num += a.subs_created - cost = num * 100 + num = v.subs_created + 1 + for a in v.alts: + num += a.subs_created + cost = num * 100 return render_template("sub/create_sub.html", v=v, cost=cost) @@ -238,18 +234,14 @@ def create_sub(v): @app.post("/create_sub") @is_not_permabanned def create_sub2(v): - if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403) - name = request.values.get('name') if not name: abort(400) name = name.strip().lower() - if request.host == 'rdrama.net': cost = 0 - else: - num = v.subs_created + 1 - for a in v.alts: - num += a.subs_created - cost = num * 100 + num = v.subs_created + 1 + for a in v.alts: + num += a.subs_created + cost = num * 100 if not valid_sub_regex.fullmatch(name): return render_template("sub/create_sub.html", v=v, cost=cost, error="Sub name not allowed."), 400 diff --git a/files/routes/users.py b/files/routes/users.py index 8e2d1336e..a698025b8 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -478,13 +478,8 @@ def leaderboard(v): sq = g.db.query(User.id, func.rank().over(order_by=User.received_award_count.desc()).label("rank")).subquery() pos5 = g.db.query(sq.c.id, sq.c.rank).filter(sq.c.id == v.id).limit(1).one()[1] - if request.host == 'pcmemes.net': - users6 = users.order_by(User.basedcount.desc()).limit(25).all() - sq = g.db.query(User.id, func.rank().over(order_by=User.basedcount.desc()).label("rank")).subquery() - pos6 = g.db.query(sq.c.id, sq.c.rank).filter(sq.c.id == v.id).limit(1).one()[1] - else: - users6 = None - pos6 = None + users6 = None + pos6 = None users7 = users.order_by(User.coins_spent.desc()).limit(25).all() sq = g.db.query(User.id, func.rank().over(order_by=User.coins_spent.desc()).label("rank")).subquery() @@ -509,16 +504,8 @@ def leaderboard(v): if pos11[1] < 25 and v not in (x[0] for x in users11): pos11 = (26, pos11[1]) - if SITE_NAME == 'rDrama': - sq = g.db.query(Marsey.author_id, func.count(Marsey.author_id).label("count"), func.rank().over(order_by=func.count(Marsey.author_id).desc()).label("rank")).group_by(Marsey.author_id).subquery() - users12 = g.db.query(User, sq.c.count).join(sq, User.id==sq.c.author_id).order_by(sq.c.count.desc()) - pos12 = g.db.query(User.id, sq.c.rank, sq.c.count).join(sq, User.id==sq.c.author_id).filter(User.id == v.id).one_or_none() - if pos12: pos12 = (pos12[1],pos12[2]) - else: pos12 = (users12.count()+1, 0) - users12 = users12.limit(25).all() - else: - users12 = None - pos12 = None + users12 = None + pos12 = None try: pos13 = [x[0].id for x in users13].index(v.id) diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index c92491309..40044a316 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -51,13 +51,6 @@
  • Daily Stat Chart
  • -{% if SITE_NAME == 'PCM' %} -

    Configuration

    - -{% endif %} - {% if v.admin_level > 2 %}
    
     	
    diff --git a/files/templates/admin/awards.html b/files/templates/admin/awards.html index 114e46b94..de4d3448f 100644 --- a/files/templates/admin/awards.html +++ b/files/templates/admin/awards.html @@ -63,7 +63,5 @@
    
    -	{% if SITE_NAME != 'rDrama' or v.id == AEVANN_ID %}
    -		
    Grant Monthly Marseybux
    - {% endif %} +
    Grant Monthly Marseybux
    {% endblock %} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 07b89c913..d1d1304f9 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -431,7 +431,7 @@ Context - + {% if v %} @@ -635,7 +635,7 @@ Context - Copy link + Copy link {% if v %} Report diff --git a/files/templates/default.html b/files/templates/default.html index 352cc4139..bc9b2777b 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -52,18 +52,6 @@ {% endif %} - {% if SITE_NAME == 'rDrama' %} - - {% endif %} - @@ -239,7 +227,7 @@ - + {% block Banner %} {% if '@' not in request.path %} diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 0ccee1646..fe4da8134 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -8,13 +8,6 @@ - - {% if SITE_NAME == 'Cringetopia' %} - - {% endif %} - @@ -62,11 +55,6 @@
    - {% if SITE_NAME == 'Cringetopia' %} -
    -
    -
    - {% endif %}
    diff --git a/files/templates/errors/patron.html b/files/templates/errors/patron.html index 5460092a5..1d88a8c5f 100644 --- a/files/templates/errors/patron.html +++ b/files/templates/errors/patron.html @@ -12,7 +12,7 @@
    :#marseymerchant:

    401 Not Authorized

    -

    This page is only available to {% if SITE_NAME == 'rDrama' %}paypigs{% else %}patrons{% endif %}:

    +

    This page is only available to patrons:

    {{config('GUMROAD_LINK')}}
    diff --git a/files/templates/header.html b/files/templates/header.html index 949b88374..07e352c8a 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -1,38 +1,23 @@