create const.py
This commit is contained in:
parent
ed34250b31
commit
cac0ebfead
18 changed files with 155 additions and 91 deletions
|
@ -4,6 +4,7 @@ from werkzeug.wrappers.response import Response as RespObj
|
|||
from .get import *
|
||||
from .alerts import send_notification
|
||||
from files.__main__ import app
|
||||
from files.helpers.const import *
|
||||
|
||||
|
||||
def get_logged_in_user():
|
||||
|
@ -48,7 +49,7 @@ def check_ban_evade(v):
|
|||
|
||||
if random.randint(0,30) < v.ban_evade:
|
||||
v.ban(reason="ban evasion")
|
||||
send_notification(1046, v, "Your account has been permanently suspended for the following reason:\n\n> ban evasion")
|
||||
send_notification(NOTIFICATIONS_ACCOUNT, v, "Your account has been permanently suspended for the following reason:\n\n> ban evasion")
|
||||
|
||||
for post in g.db.query(Submission).filter_by(author_id=v.id).all():
|
||||
if post.is_banned:
|
||||
|
@ -60,7 +61,7 @@ def check_ban_evade(v):
|
|||
|
||||
ma=ModAction(
|
||||
kind="ban_post",
|
||||
user_id=2360,
|
||||
user_id=AUTOJANNY_ACCOUNT,
|
||||
target_submission_id=post.id,
|
||||
note="ban evasion"
|
||||
)
|
||||
|
@ -78,7 +79,7 @@ def check_ban_evade(v):
|
|||
|
||||
ma=ModAction(
|
||||
kind="ban_comment",
|
||||
user_id=2360,
|
||||
user_id=AUTOJANNY_ACCOUNT,
|
||||
target_comment_id=comment.id,
|
||||
note="ban evasion"
|
||||
)
|
||||
|
@ -251,4 +252,4 @@ def api(*scopes, no_ban=False):
|
|||
wrapper.__name__ = f.__name__
|
||||
return wrapper
|
||||
|
||||
return wrapper_maker
|
||||
return wrapper_maker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue