censor slurs on flairs

master
Aevann1 2022-07-12 22:09:59 +02:00
parent 75b2b62597
commit a088a6ec7b
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@ from files.helpers.wrappers import *
from files.helpers.alerts import * from files.helpers.alerts import *
from files.helpers.get import * from files.helpers.get import *
from files.helpers.const import * from files.helpers.const import *
from files.helpers.regex import *
from files.helpers.discord import * from files.helpers.discord import *
from files.helpers.actions import * from files.helpers.actions import *
from files.classes.award import * from files.classes.award import *
@ -230,6 +231,7 @@ def award_thing(v, thing_type, id):
author.flairchanged += 86400 author.flairchanged += 86400
else: else:
author.customtitleplain = new_name author.customtitleplain = new_name
new_name = censor_slurs(new_name, None)
author.customtitle = filter_emojis_only(new_name) author.customtitle = filter_emojis_only(new_name)
if len(author.customtitle) > 1000: abort(403) if len(author.customtitle) > 1000: abort(403)
author.flairchanged = int(time.time()) + 86400 author.flairchanged = int(time.time()) + 86400

View File

@ -872,6 +872,8 @@ def settings_title_change(v):
v.customtitleplain = new_name v.customtitleplain = new_name
new_name = censor_slurs(new_name, None)
v.customtitle = filter_emojis_only(new_name) v.customtitle = filter_emojis_only(new_name)
if len(v.customtitle) < 1000: if len(v.customtitle) < 1000: