diff --git a/docker-compose.yml b/docker-compose.yml index 0830e86cb..c292e3a36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,7 @@ services: - COINS_NAME=Dramacoins - DEFAULT_THEME=dark - DEFAULT_COLOR=ff66ac + - SLOGAN=Dude bussy lmao links: - "redis" - "postgres" diff --git a/files/__main__.py b/files/__main__.py index b9951803f..98c8a1419 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -47,6 +47,7 @@ app.config["SESSION_COOKIE_SAMESITE"] = "Lax" app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365 app.config["SESSION_REFRESH_EACH_REQUEST"] = True +app.config["SLOGAN"] = environ.get("SLOGAN").strip() app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR").strip() app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME").strip() + "_" + environ.get("DEFAULT_COLOR").strip() diff --git a/files/classes/user.py b/files/classes/user.py index f40437b53..acddd7005 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -535,7 +535,7 @@ class User(Base, Stndrd, Age_times): self.profileurl = None delete_role(self, "linked") - self.is_banned = admin.id if admin else 2317 + self.is_banned = admin.id if admin else 2360 if reason: self.ban_reason = reason g.db.add(self) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index d884b6337..95855a03f 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -60,7 +60,7 @@ def check_ban_evade(v): ma=ModAction( kind="ban_post", - user_id=2317, + user_id=2360, target_submission_id=post.id, note="ban evasion" ) @@ -78,7 +78,7 @@ def check_ban_evade(v): ma=ModAction( kind="ban_comment", - user_id=2317, + user_id=2360, target_comment_id=comment.id, note="ban evasion" ) diff --git a/files/routes/comments.py b/files/routes/comments.py index 0b3249461..3ca258478 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -233,7 +233,7 @@ def api_comment(v): comment.ban_reason = "Automatic spam removal. This happened because the post's creator submitted too much similar content too quickly." g.db.add(comment) ma=ModAction( - user_id=2317, + user_id=2360, target_comment_id=comment.id, kind="ban_comment", note="spam" @@ -302,7 +302,7 @@ def api_comment(v): g.db.add(c) - c_jannied = Comment(author_id=2317, + c_jannied = Comment(author_id=2360, parent_submission=parent_submission, distinguish_level=6, parent_comment_id=c.id, @@ -335,7 +335,7 @@ def api_comment(v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - if len(body) >= 1000 and v.username != "Snappy" and "" not in body_html: + if "rdrama" in request.host and len(body) >= 1000 and v.username != "Snappy" and "" not in body_html: c2 = Comment(author_id=1832, parent_submission=parent_submission, parent_comment_id=c.id, @@ -366,7 +366,7 @@ def api_comment(v): - if random.random() < 0.001 and v.username != "Snappy" and v.username != "zozbot": + if "rdrama" in request.host and random.random() < 0.001 and v.username != "Snappy" and v.username != "zozbot": c2 = Comment(author_id=1833, parent_submission=parent_submission, parent_comment_id=c.id, @@ -644,7 +644,7 @@ def edit_comment(cid, v): g.db.add(c) - c_jannied = Comment(author_id=2317, + c_jannied = Comment(author_id=2360, parent_submission=c.parent_submission, distinguish_level=6, parent_comment_id=c.id, diff --git a/files/routes/login.py b/files/routes/login.py index f5c3b1478..e9d5e8cff 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -352,11 +352,10 @@ def sign_up_post(v): check_for_alts(new_user.id) # send welcome/verify email - if email: - send_verification_email(new_user) + if email: send_verification_email(new_user) # send welcome message - send_notification(1046, new_user, "Dude bussy lmao") + if "rdrama" in request.host: send_notification(1046, new_user, "Dude bussy lmao") session["user_id"] = new_user.id session["session_id"] = token_hex(16) diff --git a/files/routes/posts.py b/files/routes/posts.py index 765402991..c7d6965ab 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -302,7 +302,7 @@ def edit_post(pid, v): g.db.add(p) - c_jannied = Comment(author_id=2317, + c_jannied = Comment(author_id=2360, parent_submission=p.id, level=1, over_18=False, @@ -689,7 +689,7 @@ def submit_post(v): post.ban_reason = "Automatic spam removal. This happened because the post's creator submitted too much similar content too quickly." g.db.add(post) ma=ModAction( - user_id=2317, + user_id=2360, target_submission_id=post.id, kind="ban_post", note="spam" @@ -851,7 +851,7 @@ def submit_post(v): g.db.add(new_post) - c_jannied = Comment(author_id=2317, + c_jannied = Comment(author_id=2360, parent_submission=new_post.id, level=1, over_18=False, @@ -897,10 +897,13 @@ def submit_post(v): g.db.add(c) g.db.flush() - if v.id == 995: body = "fuck off carp" - else: body = random.choice(snappyquotes) + if "rdrama" in request.host: + if v.id == 995: body = "fuck off carp" + else: body = random.choice(snappyquotes) + body += "\n\n---\n\n" + else: body = "" if new_post.url: - body += f"\n\n---\n\nSnapshots:\n\n* [reveddit.com](https://reveddit.com/{new_post.url})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={urllib.parse.quote(new_post.url)}&run=1) (click to archive)" + body += f"Snapshots:\n\n* [reveddit.com](https://reveddit.com/{new_post.url})\n* [archive.org](https://web.archive.org/{new_post.url})\n* [archive.ph](https://archive.ph/?url={urllib.parse.quote(new_post.url)}&run=1) (click to archive)" gevent.spawn(archiveorg, new_post.url) with CustomRenderer(post_id=new_post.id) as renderer: body_md = renderer.render(mistletoe.Document(body)) body_html = sanitize(body_md, linkgen=True) diff --git a/files/templates/default.html b/files/templates/default.html index b29fad1fc..178e86e7c 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -839,7 +839,7 @@ - + @@ -847,7 +847,7 @@ - + {% endblock %} diff --git a/files/templates/header.html b/files/templates/header.html index c68cace21..0ecdbfd99 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -112,7 +112,7 @@
- Log out + Log out
diff --git a/files/templates/settings.html b/files/templates/settings.html index 15a34fc62..dba3b6de1 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -55,7 +55,7 @@ - + @@ -63,7 +63,7 @@ - + diff --git a/files/templates/settings2.html b/files/templates/settings2.html index 21699d3fa..cc1d05d68 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -16,7 +16,7 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 3799a60d9..ccb9e43d4 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -73,7 +73,7 @@ - + @@ -81,7 +81,7 @@ - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index cef83974f..8a372eca4 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -13,7 +13,7 @@ - + @@ -21,7 +21,7 @@ - +