remotes/1693045480750635534/spooky-22
Aevann1 2022-05-07 07:28:51 +02:00
parent 0ba60ddb3d
commit 1b86af8def
8 changed files with 19 additions and 11 deletions

View File

@ -888,6 +888,8 @@ yt_id_regex = re.compile('[a-z0-9-_]{5,20}', flags=re.I|re.A)
image_regex = re.compile("(^|\s)(https:\/\/[\w\-.#&/=\?@%;+]{5,250}(\.png|\.jpg|\.jpeg|\.gif|\.webp|maxwidth=9999|fidelity=high))($|\s)", flags=re.I|re.A)
link_fix_regex = re.compile("(?!.*(http|\/))(.*\[[^\]]+\]\()([^)]+\))", flags=re.A)
css_regex = re.compile('''url\(['"]?(.*?)['"]?\)''', flags=re.I|re.A)
css_regex2 = re.compile('''['"](http.*?)['"]''', flags=re.I|re.A)

View File

@ -137,6 +137,8 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
sanitized = image_check_regex.sub(r'\1', sanitized)
sanitized = link_fix_regex.sub(r'\2https://\3', sanitized)
sanitized = markdown(sanitized)
sanitized = strikethrough_regex.sub(r'<del>\1</del>', sanitized)

View File

@ -1342,6 +1342,9 @@ def submit_post(v, sub=None):
body += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)}) (click to archive)\n\n'
gevent.spawn(archiveorg, href)
if body == '!slots':
body = f'!slots{snappy.coins}'
body_html = sanitize(body)
if len(body_html) < 40000:
@ -1362,7 +1365,7 @@ def submit_post(v, sub=None):
snappy.coins += 1
g.db.add(snappy)
if body.startswith('!slots1000'):
if body.startswith('!slots'):
check_for_slots_command(body, snappy, c)
g.db.flush()

View File

@ -776,7 +776,8 @@ def messagereply(v):
g.db.add(notif)
ids = [c.top_comment.id] + [x.id for x in c.top_comment.replies]
notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids))
uids = [x.id for x in admins]
notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids), Notification.user_id.in_(uids))
for n in notifications:
g.db.delete(n)

View File

@ -247,7 +247,7 @@
<img alt="/h/{{sub.name}} banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
{% elif SITE_NAME == 'rDrama' %}
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %}
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=26' %}
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
{% if v and (v.is_banned or v.agendaposter) %}

View File

@ -1,27 +1,27 @@
INSERT INTO public.users (username, passhash, created_utc, admin_level, over_18, is_activated, bio, bio_html, login_nonce, is_private,
unban_utc, original_username, customtitle, defaultsorting, defaultsortingcomments, defaulttime, namecolor, titlecolor,
customtitleplain, theme, themecolor, changelogsub, reddit, css, profilecss, coins, agendaposter,
post_count, comment_count, background, verified, truecoins, cardview
post_count, comment_count, background, verified, truecoins, cardview, profileurl, highres
) VALUES ('System', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'System', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac',
'', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false),
0, 0, '', 'Verified', 0, false, '/assets/images/pfps/2.webp', '/assets/images/pfps/2.webp'),
('AutoJanny', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoJanny', '', 'hot', 'top', 'day', 'ff66ac', 'ff66ac',
'', 'dark', 'ff66ac', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false),
0, 0, '', 'Verified', 0, false, '/assets/images/pfps/2.webp', '/assets/images/pfps/2.webp'),
('Snappy', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'Snappy', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false),
0, 0, '', 'Verified', 0, false, '/assets/images/pfps/3.webp', '/assets/images/pfps/3.webp'),
('longpostbot', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'longpostbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false),
0, 0, '', 'Verified', 0, false, '/assets/images/pfps/4.webp', '/assets/images/pfps/4.webp'),
('zozbot', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'zozbot', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,
0, 0, '', 'Verified', 0, false),
0, 0, '', 'Verified', 0, false, '/assets/images/pfps/5.webp', '/assets/images/pfps/5.webp'),
('AutoPoller', '', extract(epoch from now()), 0, true, true, '', '', 0, false,
0, 'AutoPoller', '', 'hot', 'top', 'day', '62ca56', 'e4432d',
'', 'dark', '30409f', false, 'old.reddit.com', '', '', 0, 0,

View File

@ -598,7 +598,7 @@ Ayoo, youre fat as fuck!
{[para]}
AVOCADO NIGGER!
{[para]}
!slots1000
!slots
Youre poor, figure it out. Imagine being at the super market looking at the cost of nectors and shit. Fuck you, dude.
{[para]}
Want to go rape some fire hydrants?

View File

@ -3261,7 +3261,7 @@ That I am trapped in this particular irrelevancy is never more apparent to me th
{[para]}
https://youtube.com/watch?v=5I884gOUONg
{[para]}
!slots1000
!slots
{[para]}
Fuck you. Dog walkings great. Excellent way to make side cash and get exercise, and being able to immediately make any dog fall in love with you is a skill I use on a monthly basis.