remotes/1693045480750635534/spooky-22
Aevann1 2022-05-07 06:13:19 +02:00
parent a3d16fa3e4
commit f2039d7713
8 changed files with 25 additions and 40 deletions

View File

@ -452,7 +452,7 @@ 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'
elif dues == -2: 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

View File

@ -192,6 +192,7 @@ class User(Base):
if not self.has_badge(134):
new_badge = Badge(badge_id=134, user_id=self.id)
g.db.add(new_badge)
g.db.commit()
return True
return False

View File

@ -32,8 +32,8 @@ if SITE_NAME == 'Cringetopia':
SLURS = {
"retarded": "neurodivergent",
"retard": "neurodivergent",
"faggotry": "cute twinkry",
"faggot": "cute twink",
"fag": "cute twink",
"n1gger": "🏀",
"nlgger": "🏀",
"nigger": "🏀",
@ -43,11 +43,7 @@ if SITE_NAME == 'Cringetopia':
"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",
" fag ": " cute twink ",
" fags ": " cute twinks ",
}
"heil hitler": "hello kitty", }
else:
SLURS = {
"california": "commiefornia",
@ -61,8 +57,8 @@ else:
"richfag": "richstrag",
"newfag": "newstrag",
"oldfag": "oldstrag",
"faggotry": "cute twinkry",
"faggot": "cute twink",
"fag": "cute twink",
"pedophile": "libertarian",
"kill yourself": "keep yourself safe",
"n1gger": "BIPOC",
@ -114,8 +110,6 @@ else:
" kys ": " keep yourself safe ",
" pedo ": " libertarian ",
" pedos ": " libertarians ",
" fag ": " cute twink ",
" fags ": " cute twinks ",
}
single_words = "|".join([slur.lower() for slur in SLURS.keys()])

View File

@ -57,10 +57,4 @@ def send_discord_message(message):
headers = {"Authorization": f"Bot {BOT_TOKEN}"}
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/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)
requests.post("https://discordapp.com/api/channels/924486091795484732/messages", headers=headers, data=data, timeout=5)

View File

@ -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)
if request.host == 'rdrama.net': num = 5
else: num = 1
else: num = 0.5
if sort == "hot":
ti = int(time.time()) + 3600

View File

@ -4,7 +4,7 @@ import requests
from files.helpers.wrappers import *
from files.helpers.sanitize 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.slots import *
from files.classes import *
@ -90,9 +90,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)
@ -1392,9 +1390,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)

View File

@ -34,13 +34,13 @@ def marseys(v):
def marsey_list():
# From database
emojis = [{
"name": emoij.name,
"name": emoji.name,
"author": author if SITE_NAME == 'rDrama' else "rDrama's chads",
# 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 []),
"count": emoij.count,
"tags": emoji.tags.split(" ") + [emoji.name[len("marsey"):] if emoji.name.startswith("marsey") else emoji.name] + ([author] if SITE_NAME == 'rDrama' else []),
"count": emoji.count,
"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
shit = open("files/assets/shit emojis.json", "r", encoding="utf-8")

View File

@ -29,19 +29,19 @@
<fieldset class="p-2">
<label style="display: inline">Options:</legend>
<div style="display: inline" title="Makes the emoji larger">
<input type="checkbox" id="emoij-sel-0" value="#" class="emoij-suffix">
<label for="emoij-sel-0">Large</label>
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Makes the emoji larger">
<input type="checkbox" id="emoji-sel-0" value="#" class="emoji-suffix">
<label for="emoji-sel-0">Large</label>
</div>
<div style="display: inline" title="Mirror the emoji along the Y axis">
<input type="checkbox" id="emoij-sel-1" value="!" class="emoij-suffix">
<label for="emoij-sel-1">Mirror</label>
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Mirror the emoji along the Y axis">
<input type="checkbox" id="emoji-sel-1" value="!" class="emoji-suffix">
<label for="emoji-sel-1">Mirror</label>
</div>
<div style="display: inline" title="Adds a hand that pats the emoji.&#10;Does not work with animated emoji">
<input type="checkbox" id="emoij-sel-2" value="pat" class="emoij-postfix">
<label for="emoij-sel-2">Pat</label>
<div style="display: inline" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Adds a hand that pats the emoji">
<input type="checkbox" id="emoji-sel-2" value="pat" class="emoji-postfix">
<label for="emoji-sel-2">Pat</label>
</div>
</fieldset>
<!--
@ -70,7 +70,7 @@
border: none
}
</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">
<img loading="lazy" width=50>
</button>
@ -83,4 +83,4 @@
</div>
</div>
<script src="/assets/js/emoji_modal.js?v=274"></script>
<script src="/assets/js/emoji_modal.js?v=275"></script>