Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-15 08:55:56 +02:00
commit 5b1e3b7aff
5 changed files with 16 additions and 11 deletions

View File

@ -156,6 +156,8 @@ AGENDAPOSTER_MSG_HTML = """<p>Hi <a href="/id/{id}"><img loading="lazy" src="/pp
<p>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 <code>{AGENDAPOSTER_PHRASE}</code> included.</p>
<p><em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>"""
DISCORD_CHANGELOG_CHANNEL_IDS = [924485611715452940, 1013992002624426015]
WPD_CHANNEL_ID = 1013990963846332456
################################################################################
### SITE SPECIFIC CONSTANTS

View File

@ -46,9 +46,9 @@ def set_nick(user, nick):
def send_changelog_message(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/1013992002624426015/messages", headers=headers, data=data, timeout=5)
for id in DISCORD_CHANGELOG_CHANNEL_IDS:
requests.post(f"https://discordapp.com/api/channels/{id}/messages", headers=headers, data=data, timeout=5)
def send_wpd_message(message):
data={"content": message}
requests.post("https://discordapp.com/api/channels/1013990963846332456/messages", headers=headers, data=data, timeout=5)
requests.post(f"https://discordapp.com/api/channels/{WPD_CHANNEL_ID}/messages", headers=headers, data=data, timeout=5)

View File

@ -52,9 +52,6 @@ def get_logged_in_user():
loggedin = cache.get(f'{SITE}_loggedin') or {}
loggedout = cache.get(f'{SITE}_loggedout') or {}
g.loggedin_counter = 0
g.loggedout_counter = 0
timestamp = int(time.time())
if v:
if session["session_id"] in loggedout: del loggedout[session["session_id"]]
@ -69,12 +66,14 @@ def get_logged_in_user():
if 'spider' not in ua.lower() and 'bot' not in ua.lower():
loggedout[session["session_id"]] = (timestamp, ua)
g.loggedin_counter = len([x for x in loggedin.values() if timestamp-x < LOGGEDIN_ACTIVE_TIME])
loggedin = {k: v for k, v in loggedin.items() if (timestamp - v) < LOGGEDIN_ACTIVE_TIME}
loggedout = {k: v for k, v in loggedout.items() if (timestamp - v[0]) < LOGGEDIN_ACTIVE_TIME}
cache.set(f'{SITE}_loggedin', loggedin)
g.loggedout_counter = len([x for x in loggedout.values() if timestamp-x[0] < LOGGEDIN_ACTIVE_TIME])
cache.set(f'{SITE}_loggedout', loggedout)
g.loggedin_counter = len(loggedin)
g.loggedout_counter = len(loggedout)
g.v = v
if v: v.poor = session.get('poor')

View File

@ -13,8 +13,8 @@
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="/i/{{SITE_NAME}}/sidebar2.webp" width=100%>
</a>
{% elif not (sub and sub.name == 'chudrama' and v.truecoins < 5000) %}
<a href="/assets/images/rDrama/sidebar/819.webp?v=45">
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="/assets/images/rDrama/sidebar/819.webp?v=45" width=100%>
<a href="{{image}}">
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
</a>
{% endif %}
{% endif %}

View File

@ -1254,6 +1254,7 @@ INSERT INTO public.marseys (name, author_id, tags, created_utc) VALUES
('marseyben10',2,'ten anime cartoon lawlz',NULL),
('marseybestfriends',2,'snoo reddit alien slice kill kys stab blood wpd',NULL),
('marseybetauprising',2,'blackops2cel blops2cel incel volcel lasereyes dark involuntary celibate saint',1663213986),
('marseybiast',2,'darrell brooks court biased biast',1665784922),
('marseybiden',2,'ddd dementia daddy president sleepy joe',NULL),
('marseybiden2',2,'biden ddd dementia daddy president sleepy joe gas petrol ididthat',NULL),
('marseybigbrain',2,'high iq highiq smart genius brain',NULL),
@ -1945,6 +1946,7 @@ INSERT INTO public.marseys (name, author_id, tags, created_utc) VALUES
('marseyjumpscare',2,'undead living dead romero halloween horror corpse scary rotten animated spooky aaaahhhhh trick prank bait and switch',NULL),
('marseyjunkie',2,'needles heroin reaction shooting up addicted shoot up syringe',NULL),
('marseyjunkie2',2,'addicted drugs pills glue huffing ether overdose',NULL),
('marseyjurisdiction',2,'darrell brooks court subject matter jurisdiction',1665785047),
('marseykaiser',2,'prussian history wwi rifle reich wilhelm germany soldier',NULL),
('marseykamikaze',2,'kamikaze japanese nip pilot ww2 wwii world war',NULL),
('marseykatamarireddit',2,'rolling animated vidya video game damaci damacy reddit',NULL),
@ -2374,6 +2376,7 @@ INSERT INTO public.marseys (name, author_id, tags, created_utc) VALUES
('marseyreindeer2',2,'santa christmas rudolf holiday',NULL),
('marseyreindeer3',2,'rudolf dasher dancer prancer vixen comet cupid donner blitzen santa sleigh sled christmas winter holiday',NULL),
('marseyreindeer4',2,'rudolf dasher dancer prancer vixen comet cupid donner blitzen santa sleigh sled christmas winter holiday',NULL),
('marseyrelevancy',2,'darrell brooks court relevancy relevance',1665785008),
('marseyreluctant',2,'stare doubt skeptical wary cautious uncertain uhh umm',NULL),
('marseyremastered',2,'4k hd hi def hidef high definition uhd rtx',NULL),
('marseyrentfree',2,'reaction no charge obsessed obsession',NULL),
@ -2645,6 +2648,7 @@ INSERT INTO public.marseys (name, author_id, tags, created_utc) VALUES
('marseysylveon',2,'trick or treat pokemon halloween eevee costume holiday',NULL),
('marseytabletired',2,'tiresome depressed sad desk',NULL),
('marseytabletired2',2,'beer tiresome depressed sad alcoholic alcoholism despair',NULL),
('marseytakit',2,'darrell brooks court takit tacit agreement',1665785068),
('marseytaliban',2,'mujahideen janniejihad islam afganistan shariah afghanistan muslim',NULL),
('marseytalking',2,'speech bubble smug gossip',NULL),
('marseytampon',2,'period menstrual menses menstruation bloody',NULL),