2022-01-11 23:37:04 +00:00
from os import environ , listdir
2021-10-20 14:37:46 +00:00
import re
2021-12-15 19:30:26 +00:00
from copy import deepcopy
2022-01-02 20:20:13 +00:00
from json import loads
2022-02-05 21:09:17 +00:00
from files . __main__ import db_session
from files . classes . sub import Sub
2022-02-26 10:25:35 +00:00
from files . classes . marsey import Marsey
2021-08-21 11:06:28 +00:00
2021-10-21 17:01:25 +00:00
SITE = environ . get ( " DOMAIN " , ' ' ) . strip ( )
2022-01-11 23:37:04 +00:00
SITE_NAME = environ . get ( " SITE_NAME " , ' ' ) . strip ( )
2022-01-19 09:07:16 +00:00
if SITE == " localhost " : SITE_FULL = ' http:// ' + SITE
else : SITE_FULL = ' https:// ' + SITE
2022-01-29 03:55:27 +00:00
SITE_FULL2 = ' http:// ' + SITE
2022-01-19 09:07:16 +00:00
if SITE == ' pcmemes.net ' : CC = " SPLASH MOUNTAIN "
else : CC = " COUNTRY CLUB "
CC_TITLE = CC . title ( )
2022-01-29 03:55:27 +00:00
2021-11-24 17:33:44 +00:00
AJ_REPLACEMENTS = {
2021-12-29 06:43:20 +00:00
' your ' : " you ' re " ,
2021-12-31 23:45:27 +00:00
' to ' : " too " ,
2021-12-27 15:05:43 +00:00
2021-12-29 06:43:20 +00:00
' Your ' : " You ' re " ,
' To ' : " Too " ,
2021-12-28 14:14:15 +00:00
2021-12-29 06:43:20 +00:00
' YOUR ' : " YOU ' RE " ,
' TO ' : " TOO " ,
2021-11-24 17:33:44 +00:00
}
2021-08-21 11:06:28 +00:00
SLURS = {
2021-10-22 23:50:00 +00:00
" retarded " : " r-slurred " ,
" retard " : " r-slur " ,
" tard " : " r-slur " ,
2021-11-21 13:11:40 +00:00
" gayfag " : " gaystrag " ,
" poorfag " : " poorstrag " ,
" richfag " : " richstrag " ,
2021-11-15 22:49:48 +00:00
" newfag " : " newstrag " ,
" oldfag " : " oldstrag " ,
2021-11-21 13:11:40 +00:00
" faggotry " : " cute twinkry " ,
2021-10-21 20:50:15 +00:00
" faggot " : " cute twink " ,
" fag " : " cute twink " ,
" pedophile " : " libertarian " ,
" pedo " : " libertarian " ,
" kill yourself " : " keep yourself safe " ,
2021-11-13 14:29:35 +00:00
" kys " : " keep yourself safe " ,
2021-11-13 16:17:53 +00:00
" kyle " : " Kylie " ,
2022-03-05 01:55:40 +00:00
" n1g " : " BIPOC " ,
" nlg " : " BIPOC " ,
" nig " : " BIPOC " ,
2022-03-05 03:01:19 +00:00
" n1gger " : " BIPOC " ,
" nlgger " : " BIPOC " ,
" nigger " : " BIPOC " ,
2021-10-21 20:50:15 +00:00
" rapist " : " male feminist " ,
" steve akins " : " penny verity oaken " ,
" trannie " : " 🚂🚃🚃 " ,
" tranny " : " 🚂🚃🚃 " ,
" troon " : " 🚂🚃🚃 " ,
" nonewnormal " : " HorseDewormerAddicts " ,
2021-11-21 13:11:40 +00:00
" kikery " : " https://sciencedirect.com/science/article/abs/pii/S016028960600033X " ,
2021-10-21 20:50:15 +00:00
" kike " : " https://sciencedirect.com/science/article/abs/pii/S016028960600033X " ,
" janny " : " j-slur " ,
" jannie " : " j-slur " ,
2022-03-05 03:01:19 +00:00
" janny " : " j-slur " ,
2021-10-21 20:50:15 +00:00
" 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 " ,
" yid " : " Israeli friend " ,
" heeb " : " Israeli friend " ,
" sheeny " : " Israeli friend " ,
" sheenies " : " Israeli friends " ,
" hymie " : " Israeli friend " ,
" allah " : " Allah (SWT) " ,
2022-01-13 03:51:19 +00:00
" mohammad " : " Prophet Mohammad (PBUH) " ,
" muhammad " : " Prophet Mohammad (PBUH) " ,
2021-10-21 20:50:15 +00:00
" 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 " ,
2021-12-23 13:32:17 +00:00
" elon musk " : " rocket daddy " ,
" elon " : " rocket daddy " ,
2022-01-06 14:58:04 +00:00
" fake and gay " : " fake and straight " ,
2022-03-05 03:22:38 +00:00
' <img loading= " lazy " data-bs-toggle= " tooltip " alt= " :n: " title= " :n: " class= " emoji-md " src= " /e/n.webp " > <img loading= " lazy " data-bs-toggle= " tooltip " alt= " :i: " title= " :i: " class= " emoji-md " src= " /e/i.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :g: " title= " :g: " class= " emoji-md " src= " /e/g.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :g: " title= " :g: " class= " emoji-md " src= " /e/g.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :e: " title= " :e: " class= " emoji-md " src= " /e/e.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :r: " title= " :r: " class= " emoji-md " src= " /e/r.webp " > ' : ' <img loading= " lazy " data-bs-toggle= " tooltip " alt= " :b: " title= " :b: " class= " emoji-md " src= " /e/b.webp " > <img loading= " lazy " data-bs-toggle= " tooltip " alt= " :i: " title= " :i: " class= " emoji-md " src= " /e/i.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :p: " title= " :p: " class= " emoji-md " src= " /e/p.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :o: " title= " :o: " class= " emoji-md " src= " /e/o.webp " ><img loading= " lazy " data-bs-toggle= " tooltip " alt= " :c: " title= " :c: " class= " emoji-md " src= " /e/c.webp " > '
2021-08-21 11:06:28 +00:00
}
2022-03-05 03:01:19 +00:00
single_words = " | " . join ( [ slur . lower ( ) for slur in SLURS . keys ( ) ] )
2022-02-21 05:55:37 +00:00
LONGPOST_REPLIES = ( ' Wow, you must be a JP fan. ' , ' This is one of the worst posts I have EVER seen. Delete it. ' , " No, don ' t reply like this, please do another wall of unhinged rant please. " , ' # 😴😴😴 ' , " Ma ' am we ' ve been over this before. You need to stop. " , " I ' ve known more coherent downies. " , " Your pulitzer ' s in the mail " , " That ' s great and all, but I asked for my burger without cheese. " , ' That degree finally paying off ' , " That ' s nice sweaty. Why don ' t you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun. " , " All them words won ' t bring your pa back. " , " You had a chance to not be completely worthless, but it looks like you threw it away. At least you ' re consistent. " , ' Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot. ' , " You can type 10,000 characters and you decided that these were the one ' s that you wanted. " , ' Have you owned the libs yet? ' , " I don ' t know what you said, because I ' ve seen another human naked. " , ' Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities. ' , " This is a really long way of saying you don ' t fuck. " , " Sorry ma ' am, looks like his delusions have gotten worse. We ' ll have to admit him. " , ' :#marseywoah: ' , ' If only you could put that energy into your relationships ' , ' Posts like this is why I do Heroine. ' , ' still unemployed then? ' , ' K ' , ' look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷 ' , " Mommy is soooo proud of you, sweaty. Let ' s put this sperg out up on the fridge with all your other failures. " , " Good job bobby, here ' s a star " , " That was a mistake. You ' re about to find out the hard way why. " , f ' You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on { SITE } was the best option? ' , " I don ' t have enough spoons to read this shit " , " All those words won ' t bring daddy back. " , ' OUT! ' , " Damn, you ' re really mad over this, but thanks for the effort you put into typing that all out! Sadly I won ' t read it all. " , " Jesse what the fuck are you talking about?? " , " ▼you ' re fucking bananas if you think I ' m reading all that, take my downvote and shut up idiot " )
2021-08-21 11:06:28 +00:00
2022-02-28 23:30:44 +00:00
AGENDAPOSTER_PHRASE = ' trans lives matter '
2022-01-18 03:43:45 +00:00
2022-02-28 23:30:44 +00:00
AGENDAPOSTER_MSG = """ Hi @ {username} , \n \n Your {type} has been automatically removed because you forgot to include ` {AGENDAPOSTER_PHRASE} `. \n \n Don ' 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).* """
2021-08-21 11:06:28 +00:00
2022-02-25 16:48:31 +00:00
if SITE in { ' rdrama.net ' , ' devrama.xyz ' } :
2021-11-18 14:21:19 +00:00
NOTIFICATIONS_ID = 1046
AUTOJANNY_ID = 2360
SNAPPY_ID = 261
LONGPOSTBOT_ID = 1832
ZOZBOT_ID = 1833
AUTOPOLLER_ID = 6176
2021-12-11 02:27:46 +00:00
AUTOBETTER_ID = 7668
2022-02-07 11:39:26 +00:00
AUTOCHOICE_ID = 9167
2022-02-21 01:44:37 +00:00
BASEDBOT_ID = 0
2022-02-28 23:01:57 +00:00
A_ID = 1230
2022-02-21 01:44:37 +00:00
KIPPY_ID = 7150
2022-03-09 01:44:53 +00:00
GIFT_NOTIF_ID = 995
2022-01-17 11:47:30 +00:00
PIZZASHILL_ID = 2424
2022-03-23 16:01:10 +00:00
PIZZA_VOTERS = ( 1 , 747 , 1963 , 9712 )
2021-11-19 17:47:39 +00:00
IDIO_ID = 30
2021-10-23 19:40:49 +00:00
CARP_ID = 995
2021-12-02 20:48:13 +00:00
JOAN_ID = 28
2022-01-07 21:44:38 +00:00
MOOSE_ID = 1904
2021-12-02 20:48:13 +00:00
AEVANN_ID = 1
2022-01-28 23:55:42 +00:00
HOMO_ID = 147
2022-03-22 00:12:24 +00:00
SOREN_ID = 2546
2022-01-17 20:29:06 +00:00
Q_ID = 1480
2021-10-23 19:40:49 +00:00
LAWLZ_ID = 3833
LLM_ID = 253
2021-11-16 00:18:41 +00:00
DAD_ID = 2513
2021-11-18 20:53:47 +00:00
MOM_ID = 4588
2021-12-12 19:25:55 +00:00
DONGER_ID = 541
2022-01-06 14:58:04 +00:00
BUG_THREAD = 18459
2022-02-07 15:07:46 +00:00
WELCOME_MSG = f " 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 \n Thanks! \n \n Next 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]( { SITE_FULL } /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 \n Definitely 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 \n You ' ll want to set this pretty soon; without uploading one, I put together a randomly-assigned selection of 180ish pictures of furries, ugly goths, mujahideen, anime girls, and My Little Ponys which are used by everyone who was too lazy to set a pfp. Set the banner too while you ' re at it. Your profile is important! \n \n ### Flairs \n \n Since 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 \n Speaking 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 \n Dramacoin 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]( { SITE_FULL } /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. Holiday-themed awards are currently unavailable while we resolve an internal dispute, but they **will** return, no matter what some other janitors insist. \n \n Like 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 \n Dramacoin can also be traded amongst users from their profiles. Note that there is a 3% transaction fee. \n \n **Dramacoin and shop items cannot be purchased with real money and this will not change.** Though we are notoriously susceptible to bribes, so definitely shoot your shot. It ' ll probably go well, honestly. \n \n ### Badges \n \n Remember 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 t
2021-10-23 19:40:49 +00:00
elif SITE == " pcmemes.net " :
2021-11-18 14:21:19 +00:00
NOTIFICATIONS_ID = 1046
AUTOJANNY_ID = 1050
SNAPPY_ID = 261
LONGPOSTBOT_ID = 1832
ZOZBOT_ID = 1833
2022-03-05 21:42:58 +00:00
AUTOPOLLER_ID = 2129
2021-12-14 01:43:22 +00:00
AUTOBETTER_ID = 1867
2022-02-07 11:39:26 +00:00
AUTOCHOICE_ID = 2072
2022-02-21 01:44:37 +00:00
BASEDBOT_ID = 800
2022-02-28 23:01:57 +00:00
A_ID = 0
2022-02-21 01:44:37 +00:00
KIPPY_ID = 1592
2022-01-17 11:47:30 +00:00
PIZZASHILL_ID = 0
2022-03-23 16:01:10 +00:00
PIZZA_VOTERS = ( )
2022-03-09 01:44:53 +00:00
GIFT_NOTIF_ID = 1592
2021-11-19 17:47:39 +00:00
IDIO_ID = 0
2021-10-23 19:40:49 +00:00
CARP_ID = 0
2021-12-02 20:48:13 +00:00
JOAN_ID = 0
2022-01-07 21:44:38 +00:00
MOOSE_ID = 0
2021-12-02 20:48:13 +00:00
AEVANN_ID = 1
2022-01-28 23:55:42 +00:00
HOMO_ID = 0
2022-03-22 00:12:24 +00:00
SOREN_ID = 0
2022-01-17 20:29:06 +00:00
Q_ID = 0
2021-10-23 19:40:49 +00:00
LAWLZ_ID = 0
2021-11-03 00:39:03 +00:00
LLM_ID = 0
2021-11-16 00:18:41 +00:00
DAD_ID = 0
2021-11-18 20:53:47 +00:00
MOM_ID = 0
2021-12-12 19:36:49 +00:00
DONGER_ID = 0
2021-12-05 19:56:30 +00:00
BUG_THREAD = 4103
2021-12-28 08:17:49 +00:00
WELCOME_MSG = " Welcome to pcmemes.net! Don ' t forget to turn off the slur filter [here](/settings/content#slurreplacer) "
2021-10-16 19:29:36 +00:00
else :
2021-11-18 14:21:19 +00:00
NOTIFICATIONS_ID = 1
AUTOJANNY_ID = 2
SNAPPY_ID = 3
LONGPOSTBOT_ID = 4
ZOZBOT_ID = 5
AUTOPOLLER_ID = 6
2021-12-11 03:33:59 +00:00
AUTOBETTER_ID = 7
2022-02-07 11:39:26 +00:00
AUTOCHOICE_ID = 8
2022-02-21 01:44:37 +00:00
BASEDBOT_ID = 0
2022-02-28 23:01:57 +00:00
A_ID = 0
2022-02-21 01:44:37 +00:00
KIPPY_ID = 0
2022-03-09 01:44:53 +00:00
GIFT_NOTIF_ID = 9
2022-01-17 11:47:30 +00:00
PIZZASHILL_ID = 0
2022-03-23 16:01:10 +00:00
PIZZA_VOTERS = ( )
2021-11-19 17:47:39 +00:00
IDIO_ID = 0
2021-10-23 19:40:49 +00:00
CARP_ID = 0
2021-12-02 20:48:13 +00:00
JOAN_ID = 0
2022-01-07 21:44:38 +00:00
MOOSE_ID = 0
2022-02-26 14:39:47 +00:00
AEVANN_ID = 9
2022-01-28 23:55:42 +00:00
HOMO_ID = 0
2022-03-22 00:12:24 +00:00
SOREN_ID = 0
2022-01-17 20:29:06 +00:00
Q_ID = 0
2021-10-23 19:40:49 +00:00
LAWLZ_ID = 0
2021-11-03 00:39:03 +00:00
LLM_ID = 0
2021-11-16 00:18:41 +00:00
DAD_ID = 0
2021-11-18 20:53:47 +00:00
MOM_ID = 0
2021-12-12 19:36:49 +00:00
DONGER_ID = 0
2021-12-05 19:56:30 +00:00
BUG_THREAD = 0
2021-12-28 08:17:49 +00:00
WELCOME_MSG = f " Welcome to { SITE } ! "
2021-10-23 17:02:39 +00:00
2022-01-15 06:01:39 +00:00
PUSHER_ID = environ . get ( " PUSHER_ID " , " " ) . strip ( )
2021-10-20 14:37:46 +00:00
PUSHER_KEY = environ . get ( " PUSHER_KEY " , " " ) . strip ( )
2022-02-05 11:31:05 +00:00
DEFAULT_COLOR = environ . get ( " DEFAULT_COLOR " , " fff " ) . strip ( )
2022-02-05 17:51:42 +00:00
COLORS = { ' ff66ac ' , ' 805ad5 ' , ' 62ca56 ' , ' 38a169 ' , ' 80ffff ' , ' 2a96f3 ' , ' eb4963 ' , ' ff0000 ' , ' f39731 ' , ' 30409f ' , ' 3e98a7 ' , ' e4432d ' , ' 7b9ae4 ' , ' ec72de ' , ' 7f8fa6 ' , ' f8db58 ' , ' 8cdbe6 ' , DEFAULT_COLOR }
2021-10-20 14:37:46 +00:00
2021-11-02 21:29:53 +00:00
AWARDS = {
2022-02-28 23:33:01 +00:00
" nword " : {
" kind " : " nword " ,
" title " : " Nword Pass " ,
" description " : " ??? " ,
" icon " : " fas fa-edit " ,
" color " : " text-success " ,
" price " : 10000
} ,
2021-12-04 23:06:59 +00:00
" snow " : {
" kind " : " snow " ,
" title " : " Snow " ,
" description " : " ??? " ,
" icon " : " fas fa-snowflake " ,
2021-12-13 01:12:44 +00:00
" color " : " text-blue-200 " ,
" price " : 300
} ,
" gingerbread " : {
" kind " : " gingerbread " ,
" title " : " Gingerbread " ,
" description " : " ??? " ,
" icon " : " fas fa-gingerbread-man " ,
" color " : " " ,
" price " : 300
} ,
" lights " : {
" kind " : " lights " ,
" title " : " Lights " ,
" description " : " ??? " ,
2022-02-18 21:29:37 +00:00
" icon " : " fas fa-lights-holiday " ,
2021-12-13 01:12:44 +00:00
" color " : " " ,
2021-12-04 23:06:59 +00:00
" price " : 300
} ,
" candycane " : {
" kind " : " candycane " ,
" title " : " Candy Cane " ,
" description " : " ??? " ,
2022-02-18 21:29:37 +00:00
" icon " : " fas fa-candy-cane " ,
2021-12-13 01:12:44 +00:00
" color " : " " ,
" price " : 400
2021-12-04 23:06:59 +00:00
} ,
2021-12-13 01:12:44 +00:00
" fireplace " : {
" kind " : " fireplace " ,
" title " : " Fireplace " ,
2021-12-04 23:06:59 +00:00
" description " : " ??? " ,
2022-02-18 21:29:37 +00:00
" icon " : " fas fa-fireplace " ,
2021-12-13 01:12:44 +00:00
" color " : " " ,
2021-12-04 23:06:59 +00:00
" price " : 600
} ,
2021-12-13 01:12:44 +00:00
" grinch " : {
" kind " : " grinch " ,
" title " : " Grinch " ,
2021-12-04 23:06:59 +00:00
" description " : " ??? " ,
2021-12-13 01:12:44 +00:00
" icon " : " fas fa-angry " ,
" color " : " text-green-500 " ,
" price " : 1000
2021-12-04 23:06:59 +00:00
} ,
2021-11-23 22:36:38 +00:00
" haunt " : {
" kind " : " haunt " ,
" title " : " Haunt " ,
" description " : " ??? " ,
" icon " : " fas fa-book-dead " ,
" color " : " text-warning " ,
" price " : 500
} ,
" upsidedown " : {
" kind " : " upsidedown " ,
" title " : " The Upside Down " ,
" description " : " ??? " ,
2022-02-18 21:29:37 +00:00
" icon " : " fas fa-lights-holiday " ,
2021-11-23 22:36:38 +00:00
" color " : " " ,
" price " : 400
} ,
" stab " : {
" kind " : " stab " ,
" title " : " Stab " ,
" description " : " ??? " ,
" icon " : " fas fa-knife-kitchen " ,
2022-02-28 02:45:49 +00:00
" color " : " text-danger " ,
2021-11-23 22:36:38 +00:00
" price " : 300
} ,
" spiders " : {
" kind " : " spiders " ,
" title " : " Spiders " ,
" description " : " ??? " ,
" icon " : " fas fa-spider " ,
" color " : " text-black " ,
" price " : 200
} ,
" fog " : {
" kind " : " fog " ,
" title " : " Fog " ,
" description " : " ??? " ,
" icon " : " fas fa-smoke " ,
" color " : " text-gray " ,
" price " : 200
} ,
" lootbox " : {
" kind " : " lootbox " ,
2021-12-14 20:48:49 +00:00
" title " : " Lootstocking " ,
2021-11-23 22:36:38 +00:00
" description " : " ??? " ,
2021-12-14 20:48:49 +00:00
" icon " : " fas fa-stocking " ,
2022-02-28 02:45:49 +00:00
" color " : " text-danger " ,
2021-11-23 22:36:38 +00:00
" price " : 1000
} ,
2021-11-02 21:29:53 +00:00
" shit " : {
" kind " : " shit " ,
" title " : " Shit " ,
" description " : " Makes flies swarm the post. " ,
" icon " : " fas fa-poop " ,
" color " : " text-black-50 " ,
2021-12-31 23:45:27 +00:00
" price " : 300
2021-11-02 21:29:53 +00:00
} ,
" fireflies " : {
" kind " : " fireflies " ,
" title " : " Fireflies " ,
" description " : " Makes fireflies swarm the post. " ,
" icon " : " fas fa-sparkles " ,
" color " : " text-warning " ,
2021-12-31 23:45:27 +00:00
" price " : 300
2021-11-02 21:29:53 +00:00
} ,
" train " : {
" kind " : " train " ,
" title " : " Train " ,
" description " : " Summons a train on the post. " ,
" icon " : " fas fa-train " ,
" color " : " text-pink " ,
2021-12-31 23:45:27 +00:00
" price " : 300
2021-11-02 21:29:53 +00:00
} ,
2022-02-11 23:32:14 +00:00
" scooter " : {
" kind " : " scooter " ,
" title " : " Scooter " ,
" description " : " Summons a scooter on the post. " ,
" icon " : " fas fa-flag-usa " ,
" color " : " text-muted " ,
" price " : 300
} ,
2021-12-31 23:45:27 +00:00
" wholesome " : {
2022-02-16 02:15:17 +00:00
" kind " : " wholesome " ,
" title " : " Wholesome " ,
" description " : " Summons a wholesome marsey on the post. " ,
" icon " : " fas fa-smile-beam " ,
" color " : " text-yellow " ,
" price " : 300
} ,
2022-02-11 23:32:14 +00:00
" tilt " : {
2022-02-16 02:15:17 +00:00
" kind " : " tilt " ,
" title " : " Tilt " ,
" description " : " Tilts the post or comment " ,
" icon " : " fas fa-car-tilt " ,
" color " : " text-blue " ,
" price " : 300
} ,
2022-01-31 01:41:04 +00:00
" rehab " : {
2022-02-16 02:15:17 +00:00
" kind " : " rehab " ,
" title " : " Rehab " ,
" description " : " Prevents the user from gambling for 24 hours in a last ditch effort to save them from themself. " ,
" icon " : " fas fa-dice-six " ,
" color " : " text-black " ,
" price " : 777
} ,
2022-01-01 22:52:11 +00:00
" progressivestack " : {
2022-02-16 02:15:17 +00:00
" kind " : " progressivestack " ,
" title " : " Progressive Stack " ,
" description " : " Makes votes on the recipient ' s posts and comments weigh double in the ranking algorithm for 6 hours. " ,
" icon " : " fas fa-bullhorn " ,
2022-02-28 02:45:49 +00:00
" color " : " text-danger " ,
2022-02-16 02:15:17 +00:00
" price " : 1000
} ,
2021-11-02 21:29:53 +00:00
" pin " : {
" kind " : " pin " ,
" title " : " 1-Hour Pin " ,
" description " : " Pins the post/comment. " ,
" icon " : " fas fa-thumbtack fa-rotate--45 " ,
" color " : " text-warning " ,
2021-12-10 05:09:24 +00:00
" price " : 1000
2021-11-02 21:29:53 +00:00
} ,
" unpin " : {
" kind " : " unpin " ,
" title " : " 1-Hour Unpin " ,
" description " : " Removes 1 hour from the pin duration of the post/comment. " ,
" icon " : " fas fa-thumbtack fa-rotate--45 " ,
" color " : " text-black " ,
" price " : 1000
} ,
" flairlock " : {
" kind " : " flairlock " ,
" title " : " 1-Day Flairlock " ,
2022-02-26 12:30:43 +00:00
" description " : " Sets a flair for the recipient and locks it for 24 hours. " ,
2021-11-02 21:29:53 +00:00
" icon " : " fas fa-lock " ,
" color " : " text-black " ,
" price " : 1250
} ,
2021-11-19 21:05:57 +00:00
" pizzashill " : {
" kind " : " pizzashill " ,
" title " : " Pizzashill " ,
" description " : " Forces the recipient to make all posts/comments > 280 characters for 24 hours. " ,
" icon " : " fas fa-pizza-slice " ,
" color " : " text-orange " ,
" price " : 1500
} ,
2021-11-23 22:36:38 +00:00
" bird " : {
" kind " : " bird " ,
" title " : " Bird Site " ,
" description " : " Forces the recipient to make all posts/comments < 140 characters for 24 hours. " ,
" icon " : " fab fa-twitter " ,
" color " : " text-blue " ,
" price " : 1500
} ,
2021-11-02 21:29:53 +00:00
" agendaposter " : {
" kind " : " agendaposter " ,
2022-01-28 04:37:40 +00:00
" title " : " Chud " ,
" description " : " Forces the chud theme on the recipient for 24 hours. " ,
2021-11-02 21:29:53 +00:00
" icon " : " fas fa-snooze " ,
" color " : " text-purple " ,
" price " : 2500
} ,
2022-03-09 01:49:57 +00:00
" ghost " : {
" kind " : " ghost " ,
" title " : " Ghost " ,
2022-03-10 22:38:13 +00:00
" description " : " ??? " ,
2022-03-09 01:49:57 +00:00
" icon " : " fas fa-ghost " ,
" color " : " text-white " ,
" price " : 3000
} ,
2021-11-02 21:29:53 +00:00
" marsey " : {
" kind " : " marsey " ,
" title " : " Marsey " ,
" description " : " Makes the recipient unable to post/comment anything but marsey emojis for 24 hours. " ,
" icon " : " fas fa-cat " ,
" color " : " text-orange " ,
" price " : 3000
} ,
" ban " : {
" kind " : " ban " ,
" title " : " 1-Day Ban " ,
" description " : " Bans the recipient for a day. " ,
" icon " : " fas fa-gavel " ,
" color " : " text-danger " ,
" price " : 3000
} ,
" unban " : {
" kind " : " unban " ,
" title " : " 1-Day Unban " ,
" description " : " Removes 1 day from the ban duration of the recipient. " ,
" icon " : " fas fa-gavel " ,
" color " : " text-success " ,
" price " : 3500
} ,
2022-01-17 18:20:42 +00:00
" benefactor " : {
2022-02-16 02:15:17 +00:00
" kind " : " benefactor " ,
" title " : " Benefactor " ,
" description " : " Grants one month of paypig status and 2500 marseybux to the recipient. Cannot be used on yourself. " ,
" icon " : " fas fa-gift " ,
" color " : " text-blue " ,
" price " : 4000
} ,
2022-03-23 22:42:33 +00:00
" deflector " : {
" kind " : " deflector " ,
" title " : " deflector " ,
" description " : " Causes all awards received for the next 10 hours to be deflected back at their giver. " ,
" icon " : " fas fa-shield " ,
" color " : " text-pink " ,
" price " : 7000
} ,
2021-11-02 21:29:53 +00:00
" grass " : {
" kind " : " grass " ,
" title " : " Grass " ,
2022-01-19 06:20:05 +00:00
" description " : " Ban the recipient for 30 days (if they provide a timestamped picture of them touching grass/snow/sand/ass to the admins, they will get unbanned immediately) " ,
2021-11-02 21:29:53 +00:00
" icon " : " fas fa-seedling " ,
" color " : " text-success " ,
" price " : 10000
} ,
2021-11-23 22:36:38 +00:00
" eye " : {
" kind " : " eye " ,
" title " : " All-Seeing Eye " ,
" description " : " Gives the recipient the ability to view private profiles. " ,
" icon " : " fas fa-eye " ,
" color " : " text-silver " ,
" price " : 10000
} ,
2021-12-09 20:12:21 +00:00
" unblockable " : {
" kind " : " unblockable " ,
" title " : " Unblockable " ,
" description " : " Makes the recipient unblockable and removes all blocks on them. " ,
" icon " : " far fa-laugh-squint " ,
" color " : " text-lightgreen " ,
" price " : 10000
} ,
2021-12-10 04:58:55 +00:00
" fish " : {
" kind " : " fish " ,
" title " : " Fish " ,
" description " : " This user cannot be unfollowed " ,
" icon " : " fas fa-fish " ,
" color " : " text-lightblue " ,
" price " : 20000
} ,
2021-11-02 21:29:53 +00:00
" pause " : {
" kind " : " pause " ,
" title " : " Pause " ,
" description " : " Gives the recipient the ability to pause profile anthems. " ,
" icon " : " fas fa-volume-mute " ,
" color " : " text-danger " ,
" price " : 20000
} ,
" unpausable " : {
" kind " : " unpausable " ,
" title " : " Unpausable " ,
" description " : " Makes the profile anthem of the recipient unpausable. " ,
" icon " : " fas fa-volume " ,
" color " : " text-success " ,
" price " : 40000
} ,
2021-11-18 20:02:26 +00:00
" alt " : {
" kind " : " alt " ,
" title " : " Alt-Seeing Eye " ,
" description " : " Gives the recipient the ability to view alts. " ,
" icon " : " fas fa-eye " ,
" color " : " text-gold " ,
" price " : 50000
} ,
2021-11-02 21:29:53 +00:00
}
2022-02-17 03:03:53 +00:00
if SITE_NAME == ' PCM ' :
2022-02-17 03:03:03 +00:00
PCM_AWARDS = {
" croag " : {
" kind " : " croag " ,
" title " : " Croag " ,
" description " : " Summons Croag on the post. " ,
" icon " : " fas fa-head-side " ,
" color " : " text-gold " ,
2022-02-17 06:16:59 +00:00
" price " : 500
2022-02-17 03:03:03 +00:00
} ,
" toe " : {
" kind " : " toe " ,
" title " : " Toe Hype " ,
" description " : " Summons Blade ' s toe on the post. " ,
" icon " : " fas fa-socks " ,
2022-02-28 02:43:03 +00:00
" color " : " text-blue " ,
2022-02-17 06:16:59 +00:00
" price " : 500
2022-02-17 03:03:03 +00:00
} ,
" crab " : {
" kind " : " crab " ,
2022-02-28 02:46:22 +00:00
" title " : " Crab " ,
2022-02-17 03:03:03 +00:00
" description " : " Rave time! " ,
2022-02-28 02:42:23 +00:00
" icon " : " fas fa-crab " ,
2022-02-28 02:44:20 +00:00
" color " : " text-danger " ,
2022-02-17 06:16:59 +00:00
" price " : 4000
2022-02-17 03:03:03 +00:00
}
}
AWARDS = { * * PCM_AWARDS , * * AWARDS }
2021-12-15 19:30:26 +00:00
AWARDS2 = deepcopy ( AWARDS )
2021-12-27 02:09:06 +00:00
for k , val in AWARDS . items ( ) :
if val [ ' description ' ] == ' ??? ' : AWARDS2 . pop ( k )
2022-02-05 07:59:10 +00:00
if SITE == ' pcmemes.net ' and k in ( ' ban ' , ' pizzashill ' , ' marsey ' , ' bird ' , ' grass ' , ' chud ' ) : AWARDS2 . pop ( k )
2021-10-26 21:31:39 +00:00
TROLLTITLES = [
" how will @ {username} ever recover? " ,
" @ {username} BTFO " ,
" [META] Getting really sick of @ {username} ’ s shit" ,
" Pretty sure this is @ {username} ' s Reddit account " ,
" Hey jannies can you please ban @ {username} " ,
2021-12-02 20:48:13 +00:00
]
NOTIFIED_USERS = {
' aevan ' : AEVANN_ID ,
' avean ' : AEVANN_ID ,
' joan ' : JOAN_ID ,
' pewkie ' : JOAN_ID ,
' carp ' : CARP_ID ,
' idio3 ' : IDIO_ID ,
' idio ' : IDIO_ID ,
' landlord_messiah ' : LLM_ID ,
' landlordmessiah ' : LLM_ID ,
' llm ' : LLM_ID ,
' landlet ' : LLM_ID ,
2021-12-12 19:27:21 +00:00
' dong ' : DONGER_ID ,
2021-12-29 06:43:20 +00:00
' kippy ' : KIPPY_ID ,
2022-02-05 07:59:10 +00:00
' the_homocracy ' : HOMO_ID ,
2022-03-22 00:12:24 +00:00
' soren ' : SOREN_ID ,
2022-01-28 02:54:50 +00:00
}
2022-02-22 04:43:37 +00:00
FORTUNE_REPLIES = ( ' <b style= " color:#6023f8 " >Your fortune: Allah Wills It</b> ' , ' <b style= " color:#d302a7 " >Your fortune: Inshallah, Only Good Things Shall Come To Pass</b> ' , ' <b style= " color:#e7890c " >Your fortune: Allah Smiles At You This Day</b> ' , ' <b style= " color:#7fec11 " >Your fortune: Your Bussy Is In For A Blasting</b> ' , ' <b style= " color:#43fd3b " >Your fortune: You Will Be Propositioned By A High-Tier Twink</b> ' , ' <b style= " color:#9d05da " >Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh</b> ' , ' <b style= " color:#f51c6a " >Your fortune: Reply Hazy, Try Again</b> ' , ' <b style= " color:#00cbb0 " >Your fortune: lmao you just lost 100 coins</b> ' , ' <b style= " color:#2a56fb " >Your fortune: Yikes 😬</b> ' , ' <b style= " color:#0893e1 " >Your fortune: You Will Be Blessed With Many Black Bulls</b> ' , ' <b style= " color:#16f174 " >Your fortune: NEETmax, The Day Is Lost If You Venture Outside</b> ' , ' <b style= " color:#fd4d32 " >Your fortune: A Taste Of Jannah Awaits You Today</b> ' , ' <b style= " color:#bac200 " >Your fortune: Watch Your Back</b> ' , ' <b style= " color:#6023f8 " >Your fortune: Outlook good</b> ' , ' <b style= " color:#d302a7 " >Your fortune: Godly Luck</b> ' , ' <b style= " color:#e7890c " >Your fortune: Good Luck</b> ' , ' <b style= " color:#7fec11 " >Your fortune: Bad Luck</b> ' , ' <b style= " color:#43fd3b " >Your fortune: Good news will come to you by mail</b> ' , ' <b style= " color:#9d05da " >Your fortune: Very Bad Luck</b> ' , ' <b style= " color:#00cbb0 " >Your fortune: キタ━━━━━━(゚∀゚)━━━━━━ !!!!</b> ' , ' <b style= " color:#2a56fb " >Your fortune: Better not tell you now</b> ' , ' <b style= " color:#0893e1 " >Your fortune: You will meet a dark handsome stranger</b> ' , ' <b style= " color:#16f174 " >Your fortune: ( ´ _ゝ`)フーン</b> ' , ' <b style= " color:#fd4d32 " >Your fortune: Excellent Luck</b> ' , ' <b style= " color:#bac200 " >Your fortune: Average Luck</b> ' )
2022-01-28 23:50:48 +00:00
2022-02-05 23:39:47 +00:00
ROLES = {
" owner " : " 864612849199480914 " ,
" admin " : " 879459632656048180 " if environ . get ( " DOMAIN " ) == " pcmemes.net " else " 846509661288267776 " ,
" linked " : " 890342909390520382 " ,
" 1 " : " 868129042346414132 " ,
" 2 " : " 875569477671067688 " ,
" 3 " : " 869434199575236649 " ,
" 4 " : " 868140288013664296 " ,
2022-02-26 21:01:40 +00:00
" 5 " : " 947236580794450010 " ,
" 6 " : " 947236351445725204 " ,
" 7 " : " 886781932430565418 " ,
2022-02-06 10:49:24 +00:00
}
if SITE_NAME == ' Drama ' : patron = ' Paypig '
2022-02-07 11:54:19 +00:00
else : patron = ' Patron '
REDDIT_NOTIFS = {
' idio3 ' : IDIO_ID ,
' aevann ' : AEVANN_ID ,
' carpflo ' : CARP_ID ,
' carpathianflorist ' : CARP_ID ,
' carpathian florist ' : CARP_ID ,
' the_homocracy ' : HOMO_ID
2022-02-10 20:35:16 +00:00
}
2022-02-15 00:18:54 +00:00
discounts = {
69 : 0.02 ,
70 : 0.04 ,
71 : 0.06 ,
72 : 0.08 ,
73 : 0.10 ,
2022-02-15 23:38:33 +00:00
}
CF_KEY = environ . get ( " CF_KEY " , " " ) . strip ( )
CF_ZONE = environ . get ( " CF_ZONE " , " " ) . strip ( )
2022-02-18 21:21:51 +00:00
CF_HEADERS = { " Authorization " : f " Bearer { CF_KEY } " , " Content-Type " : " application/json " }
2022-02-25 11:43:35 +00:00
WORDLE_LIST = ( ' aaron ' , ' about ' , ' above ' , ' abuse ' , ' acids ' , ' acres ' , ' actor ' , ' acute ' , ' adams ' , ' added ' , ' admin ' , ' admit ' , ' adopt ' , ' adult ' , ' after ' , ' again ' , ' agent ' , ' aging ' , ' agree ' , ' ahead ' , ' aimed ' , ' alarm ' , ' album ' , ' alert ' , ' alias ' , ' alice ' , ' alien ' , ' align ' , ' alike ' , ' alive ' , ' allah ' , ' allan ' , ' allen ' , ' allow ' , ' alloy ' , ' alone ' , ' along ' , ' alpha ' , ' alter ' , ' amber ' , ' amend ' , ' amino ' , ' among ' , ' angel ' , ' anger ' , ' angle ' , ' angry ' , ' anime ' , ' annex ' , ' annie ' , ' apart ' , ' apnic ' , ' apple ' , ' apply ' , ' april ' , ' areas ' , ' arena ' , ' argue ' , ' arise ' , ' armed ' , ' armor ' , ' array ' , ' arrow ' , ' aruba ' , ' ascii ' , ' asian ' , ' aside ' , ' asked ' , ' asset ' , ' atlas ' , ' audio ' , ' audit ' , ' autos ' , ' avoid ' , ' award ' , ' aware ' , ' awful ' , ' babes ' , ' bacon ' , ' badge ' , ' badly ' , ' baker ' , ' balls ' , ' bands ' , ' banks ' , ' barry ' , ' based ' , ' bases ' , ' basic ' , ' basin ' , ' basis ' , ' batch ' , ' baths ' , ' beach ' , ' beads ' , ' beans ' , ' bears ' , ' beast ' , ' beats ' , ' began ' , ' begin ' , ' begun ' , ' being ' , ' belle ' , ' belly ' , ' below ' , ' belts ' , ' bench ' , ' berry ' , ' betty ' , ' bible ' , ' bikes ' , ' bills ' , ' billy ' , ' bingo ' , ' birds ' , ' birth ' , ' bitch ' , ' black ' , ' blade ' , ' blair ' , ' blake ' , ' blame ' , ' blank ' , ' blast ' , ' blend ' , ' bless ' , ' blind ' , ' blink ' , ' block ' , ' blogs ' , ' blond ' , ' blood ' , ' bloom ' , ' blues ' , ' board ' , ' boats ' , ' bobby ' , ' bonds ' , ' bones ' , ' bonus ' , ' boobs ' , ' books ' , ' boost ' , ' booth ' , ' boots ' , ' booty ' , ' bored ' , ' bound ' , ' boxed ' , ' boxes ' , ' brain ' , ' brake ' , ' brand ' , ' brass ' , ' brave ' , ' bread ' , ' break ' , ' breed ' , ' brian ' , ' brick ' , ' bride ' , ' brief ' , ' bring ' , ' broad ' , ' broke ' , ' brook ' , ' brown ' , ' bruce ' , ' brush ' , ' bryan ' , ' bucks ' , ' buddy ' , ' build ' , ' built ' , ' bunch ' , ' bunny ' , ' burke ' , ' burns ' , ' burst ' , ' buses ' , ' busty ' , ' butts ' , ' buyer ' , ' bytes ' , ' cabin ' , ' cable ' , ' cache ' , ' cakes ' , ' calif ' , ' calls ' , ' camel ' , ' camps ' , ' canal ' , ' candy ' , ' canon ' , ' cards ' , ' carey ' , ' cargo ' , ' carlo ' , ' carol ' , ' carry ' , ' cases ' , ' casey ' , ' casio ' , ' catch ' , ' cause ' , ' cedar ' , ' cells ' , ' cents ' , ' chain ' , ' chair ' , ' chaos ' , ' charm ' , ' chart ' , ' chase ' , ' cheap ' , ' cheat ' , ' check ' , ' chess ' , ' chest ' , ' chevy ' , ' chick ' , ' chief ' , ' child ' , ' chile ' , ' china ' , ' chips ' , ' choir ' , ' chose ' , ' chris ' , ' chuck ' , ' cindy ' , ' cisco ' , ' cited ' , ' civic ' , ' civil ' , ' claim ' , ' clara ' , ' clark ' , ' class ' , ' clean ' , ' clear ' , ' clerk ' , ' click ' , ' cliff ' , ' climb ' , ' clips ' , ' clock ' , ' clone ' , ' close ' , ' cloth ' , ' cloud ' , ' clubs ' , ' coach ' , ' coast ' , ' cocks ' , ' codes ' , ' cohen ' , ' coins ' , ' colin ' , ' colon ' , ' color ' , ' combo ' , ' comes ' , ' comic ' , ' condo ' , ' congo ' , ' const ' , ' coral ' , ' corps ' , ' costa ' , ' costs ' , ' could ' , ' count ' , ' court ' , ' cover ' , ' crack ' , ' craft ' , ' craig ' , ' craps ' , ' crash ' , ' crazy ' , ' cream ' , ' creek ' , ' crest ' , ' crime ' , ' crops ' , ' cross ' , ' crowd ' , ' crown ' , ' crude ' , ' cubic ' , ' curve ' , ' cyber ' , ' cycle ' , ' czech ' , ' daddy ' , ' daily ' , ' dairy ' , ' daisy ' , ' dance ' , ' danny ' , ' dated ' , ' dates ' , ' david ' , ' davis ' , ' deals ' , ' dealt ' , ' death ' , ' debug ' , ' debut ' , ' decor ' , ' delay ' , ' delhi ' , ' delta ' , ' dense ' , ' depot ' , ' depth ' , ' derby ' , ' derek ' , ' devel ' , ' devil ' , ' devon ' , ' diana ' , ' diane ' , ' diary ' , ' dicke ' , ' dicks ' , ' diego ' , ' diffs ' , ' digit ' , ' dildo ' , ' dirty ' , ' disco ' , ' discs ' , ' disks ' , ' dodge ' , ' doing ' , ' dolls ' , ' donna ' , ' donor ' , ' doors ' , ' doubt ' , ' dover ' , ' dozen ' , ' draft ' , ' drain ' , ' drama ' , ' drawn ' , ' draws ' , ' dream ' , ' dress ' , ' dried ' , ' drill ' , ' drink ' , ' drive ' , ' drops ' , ' drove ' , ' drugs ' , ' drums ' , ' drunk ' , ' dryer ' , ' dubai ' , ' dutch ' , ' dying ' , ' dylan ' , ' eagle ' , ' early ' , ' earth ' , ' ebony ' , ' ebook ' , ' eddie ' , ' edgar ' , ' edges ' , ' egypt ' , ' eight ' , ' elder ' , ' elect ' , ' elite ' , ' ellen ' , ' ellis ' , ' elvis ' , ' emacs ' , ' email ' , ' emily ' , ' empty ' , ' ended ' , ' endif ' , ' enemy ' , ' enjoy ' , ' enter ' , ' entry ' , ' epson ' , ' equal ' , ' error ' , ' essay ' , ' essex ' , ' euros ' , ' evans ' , ' event ' , ' every ' , ' exact ' , ' exams ' , ' excel ' , ' exist ' , ' extra ' , ' faced ' , ' faces ' , ' facts ' , ' fails ' , ' fairy ' , ' faith ' , ' falls ' , ' false ' , ' fancy ' , ' fares ' , ' farms ' , ' fatal ' , ' fatty ' , ' fault ' , ' favor ' , ' fears ' , ' feeds ' , ' feels ' , ' fence ' , ' ferry ' , ' fever ' , ' fewer ' , ' fiber ' , ' fibre ' , ' field ' , ' fifth ' , ' fifty ' , ' fight ' , ' filed ' , ' files ' , ' filme ' , ' films ' , ' final ' , ' finds ' , ' fired ' , ' fires ' , ' firms ' , ' first ' , ' fixed ' , ' fixes ' , ' flags ' , ' flame ' , ' flash ' , ' fleet ' , ' flesh ' , ' float ' , ' flood ' , ' floor ' , ' flour ' , ' flows ' , ' floyd ' , ' fluid ' , ' flush ' , ' flyer ' , ' focal ' , ' focus ' , ' folks ' , ' fonts ' , ' foods ' , ' force ' , ' forge ' , ' forms ' , ' forth ' , ' forty ' , ' forum ' , ' found ' , ' frame ' , ' frank ' , ' fraud ' , ' fresh ' , ' front ' , ' frost ' , ' fruit ' , ' fully ' , ' funds ' , ' funky ' , ' funny ' , ' fuzzy ' , ' gains ' , ' games ' , ' gamma ' , ' gates ' , ' gauge ' , ' genes ' , ' genre ' , ' ghana ' , ' ghost ' , ' giant ' , ' gifts ' , ' girls ' , ' given ' , ' gives ' , ' glass ' , ' glenn ' , ' globe ' , ' glory ' , ' gnome ' , ' goals ' , ' going ' , ' gonna ' , ' goods ' , ' gotta ' , ' grace ' ,
2022-02-24 02:52:46 +00:00
2022-02-26 10:21:25 +00:00
dues = int ( environ . get ( " DUES " ) . strip ( ) )
2022-02-26 13:42:16 +00:00
christian_emojis = ( ' :#marseyjesus: ' , ' :#marseyimmaculate: ' , ' :#marseymothermary: ' , ' :#marseyfatherjoseph: ' , ' :#gigachadorthodox: ' , ' :#marseyorthodox: ' , ' :#marseyorthodoxpat: ' )
2022-02-26 13:39:11 +00:00
2022-02-26 10:21:25 +00:00
db = db_session ( )
2022-03-09 02:26:05 +00:00
marseys_const = [ x [ 0 ] for x in db . query ( Marsey . name ) . filter ( Marsey . name != ' chudsey ' ) . all ( ) ]
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 ' ]
2022-02-26 15:22:18 +00:00
db . close ( )
2022-02-27 21:57:44 +00:00
if SITE_NAME == ' PCM ' :
valid_username_regex = re . compile ( " ^[a-zA-Z0-9_ \ -А -я] { 3,25}$ " , flags = re . A )
2022-02-28 23:01:57 +00:00
mention_regex = re . compile ( ' (^| \ s|<p>)@(([a-zA-Z0-9_ \ -А -я]) { 3,25}) ' , flags = re . A )
mention_regex2 = re . compile ( ' <p>@(([a-zA-Z0-9_ \ -А -я]) { 3,25}) ' , flags = re . A )
2022-02-27 21:57:44 +00:00
else :
valid_username_regex = re . compile ( " ^[a-zA-Z0-9_ \ -] { 3,25}$ " , flags = re . A )
2022-02-28 23:01:57 +00:00
mention_regex = re . compile ( ' (^| \ s|<p>)@(([a-zA-Z0-9_ \ -]) { 1,25}) ' , flags = re . A )
mention_regex2 = re . compile ( ' <p>@(([a-zA-Z0-9_ \ -]) { 1,25}) ' , flags = re . A )
2022-02-27 21:57:44 +00:00
valid_password_regex = re . compile ( " ^. { 8,100}$ " , flags = re . A )
2022-03-09 01:44:53 +00:00
marseyaward_body_regex = re . compile ( " >[^< \ s+]|[^> \ s+]< " , flags = re . A )
2022-02-27 21:57:44 +00:00
2022-03-09 01:44:53 +00:00
marseyaward_title_regex = re . compile ( " (<img[^>]+>)+ " , flags = re . A )
marsey_regex = re . compile ( " [a-z0-9] { 1,30} " , flags = re . A )
2022-03-01 01:40:43 +00:00
2022-03-19 18:39:32 +00:00
tags_regex = re . compile ( " [a-z0-9: ] { 1,200} " , flags = re . A )
2022-02-28 23:01:57 +00:00
image_regex = re . compile ( " (^https: \ / \ /.* \ .(png|jpg|jpeg|gif|webp|maxwidth=9999|fidelity=high)($| \ s)) " , flags = re . I | re . M | re . A )
2022-02-26 19:56:58 +00:00
2022-02-27 21:57:44 +00:00
valid_sub_regex = re . compile ( " ^[a-zA-Z0-9_ \ -] { 3,20}$ " , flags = re . A )
query_regex = re . compile ( " ( \ w+):( \ S+) " , flags = re . A )
poll_regex = re . compile ( " \ s* \ $ \ $([^ \ $ \n ]+) \ $ \ $ \ s* " , flags = re . A )
2022-02-27 22:05:51 +00:00
bet_regex = re . compile ( " \ s* \ $ \ $ \ $([^ \ $ \n ]+) \ $ \ $ \ $ \ s* " , flags = re . A )
2022-02-27 21:57:44 +00:00
choice_regex = re . compile ( " \ s*&&([^ \ $ \n ]+)&& \ s* " , flags = re . A )
embed_removing_regex = re . compile ( ' ! \ [ \ ] \ ((.*?) \ ) ' , flags = re . A )
2022-03-19 18:12:14 +00:00
image_check_regex = re . compile ( ' ! \ [ \ ] \ (((?![^? \n ]* \ .(png|jpg|jpeg|gif|webp)).*?) \ ) ' , flags = re . I | re . A )
2022-02-27 21:57:44 +00:00
title_regex = re . compile ( " [^ \ w ] " , flags = re . A )
2022-02-27 22:05:51 +00:00
based_regex = re . compile ( " based and (. { 1,20}?)(-| )pilled " , flags = re . I | re . A )
controversial_regex = re . compile ( ' (/comments/.*?) " ' , flags = re . A )
2022-03-02 00:05:30 +00:00
fishylinks_regex = re . compile ( " https?:// \ S+ " , flags = re . A )
2022-02-28 23:01:57 +00:00
spoiler_regex = re . compile ( ' \ | \ |(.*?) \ | \ | ' , flags = re . A )
video_regex = re . compile ( ' <p><a href= " (https: \ / \ /.*? \ .(mp4|webm|mov)) " rel= " nofollow noopener noreferrer " target= " _blank " >(https: \ / \ /.*? \ .(mp4|webm|mov))< \ /a>< \ /p> ' , flags = re . I | re . A )
unlinked_regex = re . compile ( ' (^| \ s|<p>)(https: \ / \ /[^ <>]*) ' , flags = re . A )
imgur_regex = re . compile ( ' (https://i \ .imgur \ .com/([^_]*?)) \ .(jpg|png|jpeg|webp)(?!</code>) ' , flags = re . A )
reddit_regex = re . compile ( ' (^| \ s|<p>) \ /?((r|u) \ /( \ w|-) { 3,25}) ' , flags = re . A )
2022-03-09 03:02:42 +00:00
sub_regex = re . compile ( ' (^| \ s|<p>) \ /?(h \ /( \ w|-) { 3,25}) ' , flags = re . A )
2022-02-28 23:01:57 +00:00
youtube_regex = re . compile ( ' " target= " _blank " >(https://youtube \ .com/watch \ ?v \ =(.*?))</a>(?!</code>) ' , flags = re . A )
2022-03-06 19:03:50 +00:00
strikethrough_regex = re . compile ( ' ~ { 1,2}([^~]+)~ { 1,2} ' , flags = re . A )
2022-02-28 23:01:57 +00:00
2022-02-28 23:30:44 +00:00
emoji_regex = re . compile ( " [^a]> \ s*(:[!#] { 0,2} \ w+: \ s*)+< \ / " , flags = re . A )
emoji_regex2 = re . compile ( ' (?<! " ):([!#A-Za-z0-9] { 1,30}?): ' , flags = re . A )
emoji_regex3 = re . compile ( ' (?<!# " ):([!#A-Za-z0-9] { 1,30}?): ' , flags = re . A )
emoji_regex4 = re . compile ( ' (?<! " ):([!A-Za-z0-9] { 1,30}?): ' , flags = re . A )
snappy_url_regex = re . compile ( ' <a href= \" (https?: \ / \ /[a-z] { 1,20} \ .[^ \" ]+) \" rel= \" nofollow noopener noreferrer \" target= \" _blank \" >(.*?)< \ /a> ' , flags = re . A )
2022-03-02 04:24:36 +00:00
email_regex = re . compile ( ' ([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+( \ .[A-Z|a-z] { 2,})+ ' , flags = re . A )
2022-03-17 16:12:59 +00:00
reddit_post_regex = re . compile ( ' (https: \ / \ /old.reddit.com \ /r \ / \ w { 1,30} \ /comments \ /[a-z0-9]+).* ' , flags = re . A )
2022-03-05 03:01:19 +00:00
slur_regex = re . compile ( rf " ((?<= \ s|>)|^)( { single_words } )((?=[ \ s<,.$]|s[ \ s<,.$])) " , flags = re . I | re . A )
slur_regex_upper = re . compile ( rf " ((?<= \ s|>)|^)( { single_words . upper ( ) } )((?=[ \ s<,.$]|S[ \ s<,.$])) " , flags = re . A )
2022-02-28 23:01:57 +00:00
torture_regex = re . compile ( ' (^| \ s)(i|me) ' , flags = re . I | re . A )
torture_regex2 = re . compile ( " (^| \ s)i ' m " , flags = re . I | re . A )
2022-02-27 21:57:44 +00:00
def sub_matcher ( match ) :
return SLURS [ match . group ( 0 ) . lower ( ) ]
def sub_matcher_upper ( match ) :
return SLURS [ match . group ( 0 ) . lower ( ) ] . upper ( )
def censor_slurs ( body , logged_user ) :
if not logged_user or logged_user . slurreplacer :
body = slur_regex_upper . sub ( sub_matcher_upper , body )
body = slur_regex . sub ( sub_matcher , body )
return body
def torture_ap ( body , username ) :
2022-03-18 18:31:24 +00:00
for k , l in AJ_REPLACEMENTS . items ( ) :
body = body . replace ( k , l )
2022-02-27 21:57:44 +00:00
body = torture_regex . sub ( rf ' \ 1@ { username } ' , body )
body = torture_regex2 . sub ( rf ' \ 1@ { username } is ' , body )
return body
2022-03-02 00:05:30 +00:00
2022-03-09 01:44:53 +00:00
YOUTUBE_KEY = environ . get ( " YOUTUBE_KEY " , " " ) . strip ( )
2022-03-10 22:38:13 +00:00
ADMIGGERS = ( 37696 , 37697 , 37749 , 37833 , 37838 )