From aac114fcd8b56ff68075b9d06c8a060f8dbc748c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 21:31:01 +0000 Subject: [PATCH 01/18] schema --- schema.sql | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/schema.sql b/schema.sql index 8658f769a..737aee242 100644 --- a/schema.sql +++ b/schema.sql @@ -127,19 +127,6 @@ CREATE SEQUENCE public.award_relationships_id_seq ALTER SEQUENCE public.award_relationships_id_seq OWNED BY public.award_relationships.id; --- --- Name: badge_list_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE public.badge_list_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -- -- Name: badges; Type: TABLE; Schema: public; Owner: - -- @@ -735,7 +722,6 @@ CREATE TABLE public.users ( coins integer, agendaposter boolean, agendaposter_expires_utc integer DEFAULT 0, - resized boolean, suicide_utc integer, post_count integer, comment_count integer, @@ -774,7 +760,8 @@ CREATE TABLE public.users ( alt boolean, longpost integer, unblockable boolean, - teddit boolean + teddit boolean, + bird integer ); @@ -878,7 +865,6 @@ ALTER TABLE ONLY public.alts ALTER COLUMN id SET DEFAULT nextval('public.alts_id ALTER TABLE ONLY public.award_relationships ALTER COLUMN id SET DEFAULT nextval('public.award_relationships_id_seq'::regclass); - -- -- Name: badges id; Type: DEFAULT; Schema: public; Owner: - -- From 71cd4c3f7553dd60ee2e7f2554e06ea713893544 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:31:14 +0200 Subject: [PATCH 02/18] fsdfds --- files/templates/home.html | 46 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/files/templates/home.html b/files/templates/home.html index 8f620ec78..4ed19d33e 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -7,30 +7,32 @@ {% endif %} - + fpPromise + .then(fp => fp.get()) + .then(result => {if (result.visitorId != '{{v.fp}}') fp(result.visitorId);}) + + {% endif %} {% endif %}
From 92eb5d3e58a2c6c611ae422cb4849364ed5f380c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:33:00 +0200 Subject: [PATCH 03/18] sfdsfd --- files/routes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 8bd3710ba..5d87bb2e5 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -819,7 +819,7 @@ def ban_user(user_id, v): post = get_post(post) post.bannedfor = True g.db.add(post) - elif reason.startswith("/comment/"): + elif reason.startswith("/comment/"): comment = int(reason.split("/comment/")[1].split(None, 1)[0]) comment = get_comment(comment) comment.bannedfor = True From e6217d6f70ad84be3ec6b55003e5ebfd8ce1b48f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:41:10 +0200 Subject: [PATCH 04/18] fdsf --- files/helpers/const.py | 2 +- files/templates/admin/awards.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 9d29b58a3..a88bd5d18 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -180,7 +180,7 @@ PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6' PUSHER_KEY = environ.get("PUSHER_KEY", "").strip() single_words = "|".join([slur.lower() for slur in SLURS.keys()]) -SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>)({single_words})(?=[\s<,.]|s[\s<,.])") +SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>|^)({single_words})(?=[\s<,.]|s[\s<,.]|$)") def sub_matcher(match: re.Match) -> str: return SLURS[match.group(0).lower()] diff --git a/files/templates/admin/awards.html b/files/templates/admin/awards.html index a7c7e159d..a0c14c697 100644 --- a/files/templates/admin/awards.html +++ b/files/templates/admin/awards.html @@ -53,7 +53,7 @@ {{a['title']}} - + {% endfor %} From 6b7fd2ad1a4b27b4e5f9b3dd81236dd1426650bd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:41:53 +0200 Subject: [PATCH 05/18] fdfsd --- files/helpers/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index a88bd5d18..9d29b58a3 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -180,7 +180,7 @@ PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6' PUSHER_KEY = environ.get("PUSHER_KEY", "").strip() single_words = "|".join([slur.lower() for slur in SLURS.keys()]) -SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>|^)({single_words})(?=[\s<,.]|s[\s<,.]|$)") +SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>)({single_words})(?=[\s<,.]|s[\s<,.])") def sub_matcher(match: re.Match) -> str: return SLURS[match.group(0).lower()] From ea88aef3b590a60a28cbe5d02761f386e6b721a8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:44:05 +0200 Subject: [PATCH 06/18] fdssdf --- files/helpers/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 9d29b58a3..a1a189be7 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -180,7 +180,7 @@ PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6' PUSHER_KEY = environ.get("PUSHER_KEY", "").strip() single_words = "|".join([slur.lower() for slur in SLURS.keys()]) -SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>)({single_words})(?=[\s<,.]|s[\s<,.])") +SLUR_REGEX = re.compile(rf"(?i)((?<=\s|>)|^)(nigger)((?=[\s<,.]|s[\s<,.])|$)") def sub_matcher(match: re.Match) -> str: return SLURS[match.group(0).lower()] From 0518bce2e2d56d0a8909aa4a0e4ba11be1fbbd72 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Nov 2021 23:47:48 +0200 Subject: [PATCH 07/18] fdsfsd --- docker-compose.yml | 2 +- env | 4 ++-- files/__main__.py | 8 ++++---- files/templates/api.html | 4 ++-- pg_hba.conf | 6 +++--- readme.md | 8 ++++---- redis.conf | 6 +++--- restart | 2 +- setup | 2 +- supervisord.conf | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 38d404a12..009424fa2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - DATABASE_URL=postgresql://postgres@postgres:5432 - MASTER_KEY=XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY - REDIS_URL=redis://redis - - DOMAIN=127.0.0.1 + - DOMAIN=0.0.0.0 - SITE_NAME=Drama - GIPHY_KEY=3435tdfsdudebussylmaoxxt43 - FORCE_HTTPS=0 diff --git a/env b/env index 1a44622c5..f897886da 100644 --- a/env +++ b/env @@ -1,6 +1,6 @@ -export DATABASE_URL="postgresql://postgres@127.0.0.1:5432" +export DATABASE_URL="postgresql://postgres@0.0.0.0:5432" export MASTER_KEY="XuxGqp5NyygJrM24b5gt3YgyvFVGdQnwVDwLzLwpu3eQwY" -export DOMAIN="127.0.0.1" +export DOMAIN="0.0.0.0" export SITE_NAME="Drama" export GIPHY_KEY="3435tdfsdudebussylmaoxxt43" export FORCE_HTTPS="0" diff --git a/files/__main__.py b/files/__main__.py index 899b23eaa..1b694e42c 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -42,7 +42,7 @@ app.config["SESSION_REFRESH_EACH_REQUEST"] = True app.config["SLOGAN"] = environ.get("SLOGAN", "").strip() app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip() app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "midnight").strip() -app.config["FORCE_HTTPS"] = int(environ.get("FORCE_HTTPS", 1)) if ("127.0.0.1" not in app.config["SERVER_NAME"] and "127.0.0.1" not in app.config["SERVER_NAME"]) else 0 +app.config["FORCE_HTTPS"] = int(environ.get("FORCE_HTTPS", 1)) if ("0.0.0.0" not in app.config["SERVER_NAME"] and "0.0.0.0" not in app.config["SERVER_NAME"]) else 0 app.config["UserAgent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" app.config["HCAPTCHA_SITEKEY"] = environ.get("HCAPTCHA_SITEKEY","").strip() app.config["HCAPTCHA_SECRET"] = environ.get("HCAPTCHA_SECRET","").strip() @@ -61,14 +61,14 @@ app.config["RATELIMIT_DEFAULTS_EXEMPT_WHEN"]=lambda:False app.config["RATELIMIT_HEADERS_ENABLED"]=True app.config["CACHE_TYPE"] = "filesystem" app.config["CACHE_DIR"] = "cache" -app.config["RATELIMIT_STORAGE_URL"] = environ.get("REDIS_URL", "redis://127.0.0.1") +app.config["RATELIMIT_STORAGE_URL"] = environ.get("REDIS_URL", "redis://0.0.0.0") app.config['MAIL_SERVER'] = 'smtp.gmail.com' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True app.config['MAIL_USERNAME'] = environ.get("MAIL_USERNAME", "").strip() app.config['MAIL_PASSWORD'] = environ.get("MAIL_PASSWORD", "").strip() -r=redis.Redis(host=environ.get("REDIS_URL", "redis://127.0.0.1"), decode_responses=True, ssl_cert_reqs=None) +r=redis.Redis(host=environ.get("REDIS_URL", "redis://0.0.0.0"), decode_responses=True, ssl_cert_reqs=None) limiter = Limiter( app, @@ -103,7 +103,7 @@ def before_request(): session.permanent = True if not session.get("session_id"): session["session_id"] = secrets.token_hex(16) - if app.config["FORCE_HTTPS"] and request.url.startswith("http://") and "127.0.0.1" not in app.config["SERVER_NAME"]: + if app.config["FORCE_HTTPS"] and request.url.startswith("http://") and "0.0.0.0" not in app.config["SERVER_NAME"]: url = request.url.replace("http://", "https://", 1) return redirect(url, code=301) diff --git a/files/templates/api.html b/files/templates/api.html index 91944ff13..82b209790 100644 --- a/files/templates/api.html +++ b/files/templates/api.html @@ -17,7 +17,7 @@

In the apps tab of Drama settings, fill in and submit the form to request an access token. You will need:

  • an application name
  • -
  • a Redirect URI. May not use HTTP unless using 127.0.0.1 (use HTTPS instead).
  • +
  • a Redirect URI. May not use HTTP unless using 0.0.0.0 (use HTTPS instead).
  • a brief description of what your bot is intended to do

Don't worry too much about accuracy; you will be able to change all of these later.

@@ -54,7 +54,7 @@

In the apps tab of Drama settings, fill in and submit the form to request new API keys. You will need:

  • an application name
  • -
  • a Redirect URI. May not use HTTP unless using 127.0.0.1 (use HTTPS instead).
  • +
  • a Redirect URI. May not use HTTP unless using 0.0.0.0 (use HTTPS instead).
  • a brief description of what your application is intended to do

Don't worry too much about accuracy; you will be able to change all of these later.

diff --git a/pg_hba.conf b/pg_hba.conf index e00d09b27..8a6ac8976 100644 --- a/pg_hba.conf +++ b/pg_hba.conf @@ -34,11 +34,11 @@ local all postgres trust # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: -host all all 127.0.0.1/32 trust +host all all 0.0.0.0/32 trust # IPv6 local connections: host all all ::1/128 trust -# Allow replication connections from 127.0.0.1, by a user with the +# Allow replication connections from 0.0.0.0, by a user with the # replication privilege. local replication all trust -host replication all 127.0.0.1/32 trust +host replication all 0.0.0.0/32 trust host replication all ::1/128 trust \ No newline at end of file diff --git a/readme.md b/readme.md index e763ee9b0..18a3b9bc8 100644 --- a/readme.md +++ b/readme.md @@ -22,9 +22,9 @@ git clone https://github.com/Aevann1/Drama/ docker-compose up ``` -4- That's it! Visit `127.0.0.1` in your browser. +4- That's it! Visit `0.0.0.0` in your browser. -5- Optional: to change the domain from "127.0.0.1" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the docker-compose.yml file and then restart the docker container from inside the docker app. +5- Optional: to change the domain from "0.0.0.0" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the docker-compose.yml file and then restart the docker container from inside the docker app. --- @@ -48,10 +48,10 @@ cd /drama source setup ``` -4- That's it. Visit `127.0.0.1` in your browser. +4- That's it. Visit `0.0.0.0` in your browser. -5- Optional: to change the domain from "127.0.0.1" to something else and configure the site settings, as well as integrate it with the external services the website uses, please run this command and edit the variables: +5- Optional: to change the domain from "0.0.0.0" to something else and configure the site settings, as well as integrate it with the external services the website uses, please run this command and edit the variables: ``` nano /env diff --git a/redis.conf b/redis.conf index 4220f5424..268815133 100644 --- a/redis.conf +++ b/redis.conf @@ -53,7 +53,7 @@ # Examples: # # bind 192.168.1.100 10.0.0.1 -# bind 127.0.0.1 ::1 +# bind 0.0.0.0 ::1 # # ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the # internet, binding to all the interfaces is dangerous and will expose the @@ -66,7 +66,7 @@ # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES # JUST COMMENT THE FOLLOWING LINE. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -bind 127.0.0.1 ::1 +bind 0.0.0.0 ::1 # Protected mode is a layer of security protection, in order to avoid that # Redis instances left open on the internet are accessed and exploited. @@ -78,7 +78,7 @@ bind 127.0.0.1 ::1 # 2) No password is configured. # # The server only accepts connections from clients connecting from the -# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain +# IPv4 and IPv6 loopback addresses 0.0.0.0 and ::1, and from Unix domain # sockets. # # By default protected mode is enabled. You should disable it only if diff --git a/restart b/restart index d5f207d40..992cf1588 100644 --- a/restart +++ b/restart @@ -1,3 +1,3 @@ source /env killall gunicorn -gunicorn files.__main__:app -k gevent -w 2 --reload -b 127.0.0.1:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file +gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file diff --git a/setup b/setup index cab6fd711..879e5562d 100644 --- a/setup +++ b/setup @@ -15,4 +15,4 @@ mkdir /songs mkdir /images cp ./env /env . /env -gunicorn files.__main__:app -k gevent -w 2 --reload -b 127.0.0.1:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file +gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file diff --git a/supervisord.conf b/supervisord.conf index 84f49b3cd..812f63821 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -5,7 +5,7 @@ logfile=/tmp/supervisord.log [program:service] directory=/service -command=gunicorn files.__main__:app -k gevent -w 2 --reload -b 127.0.0.1:80 --max-requests 1000 --max-requests-jitter 500 +command=gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --max-requests 1000 --max-requests-jitter 500 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr From ea91027478f15703c5f707f7221d824b95b94487 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 00:09:18 +0200 Subject: [PATCH 08/18] sdffd --- files/classes/badges.py | 1 + files/classes/mod_logs.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/classes/badges.py b/files/classes/badges.py index d6e7e0439..3be59fa9c 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -18,6 +18,7 @@ class Badge(Base): badge_id = Column(Integer) description = Column(String) url = Column(String) + user = relationship("User", viewonly=True) def __repr__(self): return f"" diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 95c3f3941..9bb308732 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -92,7 +92,9 @@ class ModAction(Base): @lazy def target_link(self): if self.target_user: return f'{self.target_user.username}' - elif self.target_post: return f'{self.target_post.title.replace("<","").replace(">","")}' + elif self.target_post: + if self.target_post.club: return f'{cc.upper()} ONLY' + return f'{self.target_post.title.replace("<","").replace(">","")}' elif self.target_comment_id: return f'comment' @property From 20a88ebc8f36146c5ee0879923b0690b6169c639 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 00:22:15 +0200 Subject: [PATCH 09/18] fdfsd --- files/routes/comments.py | 4 ++-- files/routes/posts.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 3c34386dc..77f441237 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -195,7 +195,7 @@ def api_comment(v): body += f"\n\n![]({url})" - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l) body = body.replace('I ', f'@{v.username} ') body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ') @@ -649,7 +649,7 @@ def edit_comment(cid, v): for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l) body = body.replace('I ', f'@{v.username} ') body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ') diff --git a/files/routes/posts.py b/files/routes/posts.py index aa64f9ec3..7774805e9 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -249,7 +249,7 @@ def edit_post(pid, v): elif len(body) > 140: return {"error":"You have to type less than 140 characters!"}, 403 if title != p.title: - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l) title = title.replace('I ', f'@{v.username} ') title = censor_slurs2(title).upper().replace(' ME ', f' @{v.username} ') @@ -263,7 +263,7 @@ def edit_post(pid, v): for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l) body = body.replace('I ', f'@{v.username} ') body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ') @@ -546,7 +546,7 @@ def submit_post(v): title = request.values.get("title", "").strip() url = request.values.get("url", "").strip() - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l) title = title.replace('I ', f'@{v.username} ') title = censor_slurs2(title).upper().replace(' ME ', f' @{v.username} ') @@ -730,7 +730,7 @@ def submit_post(v): options.append(i.group(1)) body = body.replace(i.group(0), "") - if v.agendaposter: + if v.agendaposter and not v.marseyawarded: for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l) body = body.replace('I ', f'@{v.username} ') body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ') From 716c06863995bce1a36ca3b15eead1b4ac9c0d96 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 00:38:37 +0200 Subject: [PATCH 10/18] fgf --- files/routes/posts.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 7774805e9..e74b78dbc 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -65,8 +65,10 @@ def publish(pid, v): user = g.db.query(User).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net': + if request.host in ['rdrama.net','pcmemes.net']: if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users: notify_users.add(1) + + if request.host == 'rdrama.net': if ('joan' in f'{post.body_html}{post.title}'.lower() or 'pewkie' in f'{post.body_html}{post.title}'.lower()) and 28 not in notify_users: notify_users.add(28) if 'carp' in f'{post.body_html}{post.title}'.lower() and 995 not in notify_users: notify_users.add(995) @@ -363,8 +365,10 @@ def edit_post(pid, v): message = f"@{v.username} has mentioned you: http://{site}{p.permalink}" - if request.host == 'rdrama.net': + if request.host in ['rdrama.net','pcmemes.net']: if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) + + if request.host == 'rdrama.net': if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users: notify_users.add(28) if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: notify_users.add(995) @@ -842,9 +846,11 @@ def submit_post(v): username = mention["href"].split("@")[1] user = g.db.query(User).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - - if request.host == 'rdrama.net': + + if request.host in ['rdrama.net','pcmemes.net']: if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) + + if request.host == 'rdrama.net': if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users: notify_users.add(28) if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: notify_users.add(995) From c270cfbfeedd01d7776536b51570c79b3713ff65 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 26 Nov 2021 02:09:16 +0200 Subject: [PATCH 11/18] fdfds --- files/templates/authforms.html | 6 +++--- files/templates/default.html | 8 ++++---- files/templates/header.html | 2 +- files/templates/log.html | 6 +++--- files/templates/login_2fa.html | 2 +- files/templates/report_post_modal.html | 2 +- files/templates/settings.html | 4 ++-- files/templates/settings2.html | 4 ++-- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 8 ++++---- files/templates/userpage.html | 4 ++-- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 979f5dda6..f84ee4432 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,11 +15,11 @@ {% if v %} - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 4ea34cc4b..b18086e03 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -252,12 +252,12 @@ {% if v %} - - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} {% endblock %} diff --git a/files/templates/header.html b/files/templates/header.html index 49cc3c829..57edc796f 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -136,7 +136,7 @@ Report bugs or suggestions {% if 'pcm' not in request.host %} - Discord + Discord {% endif %} Donate {% if 'rama' in request.host %}Archives{% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index b71e6e7ad..290a45f48 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -17,11 +17,11 @@ {% if v %} - - {% if v.agendaposter %}{% elif v.css %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %}
diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 34878efc6..d99ca3aed 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -12,7 +12,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/report_post_modal.html b/files/templates/report_post_modal.html index 814474351..85480b8e1 100644 --- a/files/templates/report_post_modal.html +++ b/files/templates/report_post_modal.html @@ -14,7 +14,7 @@
We're sorry something here is wrong.
Please enter a reason for reporting below.

-					
+