forked from rDrama/rDrama
sfd
parent
a3d16fa3e4
commit
f2039d7713
|
@ -452,7 +452,7 @@ class Submission(Base):
|
||||||
def realtitle(self, v):
|
def realtitle(self, v):
|
||||||
if self.club and not (v and (v.paid_dues or v.id == self.author_id)):
|
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)
|
if v: return random.choice(TROLLTITLES).format(username=v.username)
|
||||||
elif SITE == 'cringetopia.org': return f'Please make an account to see this post'
|
elif dues == -2: return f'Please make an account to see this post'
|
||||||
else: return f'{CC} MEMBERS ONLY'
|
else: return f'{CC} MEMBERS ONLY'
|
||||||
elif self.title_html: title = self.title_html
|
elif self.title_html: title = self.title_html
|
||||||
else: title = self.title
|
else: title = self.title
|
||||||
|
|
|
@ -192,6 +192,7 @@ class User(Base):
|
||||||
if not self.has_badge(134):
|
if not self.has_badge(134):
|
||||||
new_badge = Badge(badge_id=134, user_id=self.id)
|
new_badge = Badge(badge_id=134, user_id=self.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
|
g.db.commit()
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ if SITE_NAME == 'Cringetopia':
|
||||||
SLURS = {
|
SLURS = {
|
||||||
"retarded": "neurodivergent",
|
"retarded": "neurodivergent",
|
||||||
"retard": "neurodivergent",
|
"retard": "neurodivergent",
|
||||||
"faggotry": "cute twinkry",
|
|
||||||
"faggot": "cute twink",
|
"faggot": "cute twink",
|
||||||
|
"fag": "cute twink",
|
||||||
"n1gger": "🏀",
|
"n1gger": "🏀",
|
||||||
"nlgger": "🏀",
|
"nlgger": "🏀",
|
||||||
"nigger": "🏀",
|
"nigger": "🏀",
|
||||||
|
@ -43,11 +43,7 @@ if SITE_NAME == 'Cringetopia':
|
||||||
"autistic": "neurodivergent",
|
"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",
|
"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",
|
"i hate carp": "i love Carp",
|
||||||
"heil hitler": "hello kitty",
|
"heil hitler": "hello kitty", }
|
||||||
|
|
||||||
" fag ": " cute twink ",
|
|
||||||
" fags ": " cute twinks ",
|
|
||||||
}
|
|
||||||
else:
|
else:
|
||||||
SLURS = {
|
SLURS = {
|
||||||
"california": "commiefornia",
|
"california": "commiefornia",
|
||||||
|
@ -61,8 +57,8 @@ else:
|
||||||
"richfag": "richstrag",
|
"richfag": "richstrag",
|
||||||
"newfag": "newstrag",
|
"newfag": "newstrag",
|
||||||
"oldfag": "oldstrag",
|
"oldfag": "oldstrag",
|
||||||
"faggotry": "cute twinkry",
|
|
||||||
"faggot": "cute twink",
|
"faggot": "cute twink",
|
||||||
|
"fag": "cute twink",
|
||||||
"pedophile": "libertarian",
|
"pedophile": "libertarian",
|
||||||
"kill yourself": "keep yourself safe",
|
"kill yourself": "keep yourself safe",
|
||||||
"n1gger": "BIPOC",
|
"n1gger": "BIPOC",
|
||||||
|
@ -114,8 +110,6 @@ else:
|
||||||
" kys ": " keep yourself safe ",
|
" kys ": " keep yourself safe ",
|
||||||
" pedo ": " libertarian ",
|
" pedo ": " libertarian ",
|
||||||
" pedos ": " libertarians ",
|
" pedos ": " libertarians ",
|
||||||
" fag ": " cute twink ",
|
|
||||||
" fags ": " cute twinks ",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
single_words = "|".join([slur.lower() for slur in SLURS.keys()])
|
single_words = "|".join([slur.lower() for slur in SLURS.keys()])
|
||||||
|
|
|
@ -58,9 +58,3 @@ def send_discord_message(message):
|
||||||
data={"content": message}
|
data={"content": message}
|
||||||
requests.post("https://discordapp.com/api/channels/924485611715452940/messages", headers=headers, data=data, timeout=5)
|
requests.post("https://discordapp.com/api/channels/924485611715452940/messages", headers=headers, data=data, timeout=5)
|
||||||
requests.post("https://discordapp.com/api/channels/924486091795484732/messages", headers=headers, data=data, timeout=5)
|
requests.post("https://discordapp.com/api/channels/924486091795484732/messages", headers=headers, data=data, timeout=5)
|
||||||
|
|
||||||
|
|
||||||
def send_cringetopia_message(message):
|
|
||||||
headers = {"Authorization": f"Bot {BOT_TOKEN}"}
|
|
||||||
data={"content": message}
|
|
||||||
requests.post("https://discordapp.com/api/channels/965264044531527740/messages", headers=headers, data=data, timeout=5)
|
|
|
@ -353,7 +353,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
||||||
posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None)
|
posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None)
|
||||||
|
|
||||||
if request.host == 'rdrama.net': num = 5
|
if request.host == 'rdrama.net': num = 5
|
||||||
else: num = 1
|
else: num = 0.5
|
||||||
|
|
||||||
if sort == "hot":
|
if sort == "hot":
|
||||||
ti = int(time.time()) + 3600
|
ti = int(time.time()) + 3600
|
||||||
|
|
|
@ -4,7 +4,7 @@ import requests
|
||||||
from files.helpers.wrappers import *
|
from files.helpers.wrappers import *
|
||||||
from files.helpers.sanitize import *
|
from files.helpers.sanitize import *
|
||||||
from files.helpers.alerts import *
|
from files.helpers.alerts import *
|
||||||
from files.helpers.discord import send_discord_message, send_cringetopia_message
|
from files.helpers.discord import send_discord_message
|
||||||
from files.helpers.const import *
|
from files.helpers.const import *
|
||||||
from files.helpers.slots import *
|
from files.helpers.slots import *
|
||||||
from files.classes import *
|
from files.classes import *
|
||||||
|
@ -90,9 +90,7 @@ def publish(pid, v):
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(User.userpagelisting)
|
cache.delete_memoized(User.userpagelisting)
|
||||||
|
|
||||||
if SITE == 'cringetopia.org':
|
if v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()):
|
||||||
send_cringetopia_message(post.permalink)
|
|
||||||
elif v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()):
|
|
||||||
send_discord_message(post.permalink)
|
send_discord_message(post.permalink)
|
||||||
cache.delete_memoized(changeloglist)
|
cache.delete_memoized(changeloglist)
|
||||||
|
|
||||||
|
@ -1392,9 +1390,7 @@ def submit_post(v, sub=None):
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(User.userpagelisting)
|
cache.delete_memoized(User.userpagelisting)
|
||||||
|
|
||||||
if SITE == 'cringetopia.org':
|
if v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()) and not post.private:
|
||||||
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:
|
|
||||||
send_discord_message(post.permalink)
|
send_discord_message(post.permalink)
|
||||||
cache.delete_memoized(changeloglist)
|
cache.delete_memoized(changeloglist)
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,13 @@ def marseys(v):
|
||||||
def marsey_list():
|
def marsey_list():
|
||||||
# From database
|
# From database
|
||||||
emojis = [{
|
emojis = [{
|
||||||
"name": emoij.name,
|
"name": emoji.name,
|
||||||
"author": author if SITE_NAME == 'rDrama' else "rDrama's chads",
|
"author": author if SITE_NAME == 'rDrama' else "rDrama's chads",
|
||||||
# yikes, I don't really like this DB schema. Next time be better
|
# yikes, I don't really like this DB schema. Next time be better
|
||||||
"tags": emoij.tags.split(" ") + [emoij.name[len("marsey"):] if emoij.name.startswith("marsey") else emoij.name] + ([author] if SITE_NAME == 'rDrama' else []),
|
"tags": emoji.tags.split(" ") + [emoji.name[len("marsey"):] if emoji.name.startswith("marsey") else emoji.name] + ([author] if SITE_NAME == 'rDrama' else []),
|
||||||
"count": emoij.count,
|
"count": emoji.count,
|
||||||
"class": "Marsey"
|
"class": "Marsey"
|
||||||
} for emoij, author in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())]
|
} for emoji, author in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())]
|
||||||
|
|
||||||
# Stastic shit
|
# Stastic shit
|
||||||
shit = open("files/assets/shit emojis.json", "r", encoding="utf-8")
|
shit = open("files/assets/shit emojis.json", "r", encoding="utf-8")
|
||||||
|
|
|
@ -29,19 +29,19 @@
|
||||||
<fieldset class="p-2">
|
<fieldset class="p-2">
|
||||||
<label style="display: inline">Options:</legend>
|
<label style="display: inline">Options:</legend>
|
||||||
|
|
||||||
<div style="display: inline" title="Makes the emoji larger">
|
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Makes the emoji larger">
|
||||||
<input type="checkbox" id="emoij-sel-0" value="#" class="emoij-suffix">
|
<input type="checkbox" id="emoji-sel-0" value="#" class="emoji-suffix">
|
||||||
<label for="emoij-sel-0">Large</label>
|
<label for="emoji-sel-0">Large</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline" title="Mirror the emoji along the Y axis">
|
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Mirror the emoji along the Y axis">
|
||||||
<input type="checkbox" id="emoij-sel-1" value="!" class="emoij-suffix">
|
<input type="checkbox" id="emoji-sel-1" value="!" class="emoji-suffix">
|
||||||
<label for="emoij-sel-1">Mirror</label>
|
<label for="emoji-sel-1">Mirror</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline" title="Adds a hand that pats the emoji. Does not work with animated emoji">
|
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Adds a hand that pats the emoji">
|
||||||
<input type="checkbox" id="emoij-sel-2" value="pat" class="emoij-postfix">
|
<input type="checkbox" id="emoji-sel-2" value="pat" class="emoji-postfix">
|
||||||
<label for="emoij-sel-2">Pat</label>
|
<label for="emoji-sel-2">Pat</label>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!--
|
<!--
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
border: none
|
border: none
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template id="emoij-button-template">
|
<template id="emoji-button-template">
|
||||||
<button class="btn m-1 px-0 emoji2" data-bs-toggle="tooltip" delay:="0">
|
<button class="btn m-1 px-0 emoji2" data-bs-toggle="tooltip" delay:="0">
|
||||||
<img loading="lazy" width=50>
|
<img loading="lazy" width=50>
|
||||||
</button>
|
</button>
|
||||||
|
@ -83,4 +83,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/assets/js/emoji_modal.js?v=274"></script>
|
<script src="/assets/js/emoji_modal.js?v=275"></script>
|
Loading…
Reference in New Issue