From 5aac54f0dcf1b9366a4ed9a3bef4c9c643dc4cee Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 25 Nov 2022 23:50:21 +0200 Subject: [PATCH] remove annoying excalmation sign in notifs --- files/helpers/const.py | 2 +- files/routes/admin.py | 8 ++++---- files/routes/comments.py | 6 +++--- files/routes/login.py | 2 +- files/routes/subs.py | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 134f2b7ea..2d19150e8 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -558,7 +558,7 @@ elif SITE == 'pcmemes.net': AEVANN_ID = 1 SNAKES_ID = 2279 - WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)!" + WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)" LOTTERY_TICKET_COST = 12 LOTTERY_SINK_RATE = -8 diff --git a/files/routes/admin.py b/files/routes/admin.py index 3be5fb03e..047e10a65 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1262,7 +1262,7 @@ def sticky_post(post_id, v): pin_time = 'for 1 hour' code = 200 if v.id != post.author_id: - send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})!") + send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has pinned [{post.title}](/post/{post_id})") else: if pins >= PIN_LIMIT + 1: abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") @@ -1307,7 +1307,7 @@ def unsticky_post(post_id, v): g.db.add(ma) if v.id != post.author_id: - send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has unpinned [{post.title}](/post/{post_id})!") + send_repeatable_notification(post.author_id, f"@{v.username} (Admin) has unpinned [{post.title}](/post/{post_id})") cache.delete_memoized(frontlist) return {"message": "Post unpinned!"} @@ -1329,7 +1329,7 @@ def sticky_comment(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (Admin) has pinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (Admin) has pinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment pinned!"} @@ -1354,7 +1354,7 @@ def unsticky_comment(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (Admin) has unpinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (Admin) has unpinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment unpinned!"} diff --git a/files/routes/comments.py b/files/routes/comments.py index e6766f93b..a7ced47b4 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -514,8 +514,8 @@ def pin_comment(cid, v): g.db.add(comment) if v.id != comment.author_id: - if comment.post.ghost: message = f"OP has pinned your [comment]({comment.shortlink})!" - else: message = f"@{v.username} (OP) has pinned your [comment]({comment.shortlink})!" + if comment.post.ghost: message = f"OP has pinned your [comment]({comment.shortlink})" + else: message = f"@{v.username} (OP) has pinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment pinned!"} @@ -537,7 +537,7 @@ def unpin_comment(cid, v): g.db.add(comment) if v.id != comment.author_id: - message = f"@{v.username} (OP) has unpinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (OP) has unpinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment unpinned!"} diff --git a/files/routes/login.py b/files/routes/login.py index 1b368e041..90eee9ee7 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -113,7 +113,7 @@ def login_post(): def log_failed_admin_login_attempt(account:User, type:str): if not account or account.admin_level < PERMS['SITE_WARN_ON_INVALID_AUTH']: return ip = get_CF() - print(f"Admin user from {ip} failed to login to account @{account.user_name} (invalid {type})!") + print(f"Admin user from {ip} failed to login to account @{account.user_name} (invalid {type})") try: with open("/admin_failed_logins", "a+", encoding="utf-8") as f: t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time()))) diff --git a/files/routes/subs.py b/files/routes/subs.py index 55c5348b4..5f4a74e26 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -665,7 +665,7 @@ def mod_pin(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (/h/{comment.post.sub} Mod) has pinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (/h/{comment.post.sub} Mod) has pinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment pinned!"} @@ -691,7 +691,7 @@ def mod_unpin(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (/h/{comment.post.sub} Mod) has unpinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (/h/{comment.post.sub} Mod) has unpinned your [comment]({comment.shortlink})" send_repeatable_notification(comment.author_id, message) return {"message": "Comment unpinned!"}