minor css change
parent
e217cc9758
commit
c842d44384
|
@ -387,8 +387,8 @@ def execute_blackjack_custom(v, target, body, type):
|
||||||
|
|
||||||
def execute_blackjack(v, target, body, type):
|
def execute_blackjack(v, target, body, type):
|
||||||
if not execute_blackjack_custom(v, target, body, type): return False
|
if not execute_blackjack_custom(v, target, body, type): return False
|
||||||
if not blackjack or not body: return True
|
if not body and not blackjack and not blackjack2: return True
|
||||||
if any(i in body.lower() for i in blackjack.split()):
|
if any(i in body.lower() for i in blackjack.split()) or all(i in body.lower() for i in blackjack2.split()):
|
||||||
v.shadowbanned = AUTOJANNY_ID
|
v.shadowbanned = AUTOJANNY_ID
|
||||||
|
|
||||||
ma = ModAction(
|
ma = ModAction(
|
||||||
|
@ -401,13 +401,14 @@ def execute_blackjack(v, target, body, type):
|
||||||
|
|
||||||
v.ban_reason = "Blackjack"
|
v.ban_reason = "Blackjack"
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
notif = None
|
notifs = []
|
||||||
extra_info = "unknown entity"
|
extra_info = "unknown entity"
|
||||||
if type == 'submission':
|
if type == 'submission':
|
||||||
extra_info = f"submission ({target.permalink})"
|
extra_info = f"submission ({target.permalink})"
|
||||||
elif type == 'comment' or type == 'message':
|
elif type == 'comment' or type == 'message':
|
||||||
extra_info = f"{type} ({target.permalink})"
|
extra_info = f"{type} ({target.permalink})"
|
||||||
notif = Notification(comment_id=target.id, user_id=CARP_ID)
|
notifs.append(Notification(comment_id=target.id, user_id=CARP_ID))
|
||||||
|
notifs.append(Notification(comment_id=target.id, user_id=IDIO_ID))
|
||||||
elif type == 'chat':
|
elif type == 'chat':
|
||||||
extra_info = "chat message"
|
extra_info = "chat message"
|
||||||
elif type == 'flag':
|
elif type == 'flag':
|
||||||
|
@ -415,10 +416,13 @@ def execute_blackjack(v, target, body, type):
|
||||||
elif type == 'modmail':
|
elif type == 'modmail':
|
||||||
extra_info = "modmail"
|
extra_info = "modmail"
|
||||||
|
|
||||||
if notif:
|
if notifs:
|
||||||
g.db.add(notif)
|
for notif in notifs:
|
||||||
g.db.flush()
|
g.db.add(notif)
|
||||||
elif extra_info: send_repeatable_notification(CARP_ID, f"Blackjack for {v.username}: {extra_info}")
|
g.db.flush()
|
||||||
|
elif extra_info:
|
||||||
|
send_repeatable_notification(CARP_ID, f"Blackjack for {v.username}: {extra_info}")
|
||||||
|
send_repeatable_notification(IDIO_ID, f"Blackjack for {v.username}: {extra_info}")
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ CF_ZONE = environ.get("CF_ZONE", DEFAULT_CONFIG_VALUE).strip()
|
||||||
TELEGRAM_LINK = environ.get("TELEGRAM_LINK", DEFAULT_CONFIG_VALUE).strip()
|
TELEGRAM_LINK = environ.get("TELEGRAM_LINK", DEFAULT_CONFIG_VALUE).strip()
|
||||||
GLOBAL = environ.get("GLOBAL", "").strip()
|
GLOBAL = environ.get("GLOBAL", "").strip()
|
||||||
blackjack = environ.get("BLACKJACK", "").strip()
|
blackjack = environ.get("BLACKJACK", "").strip()
|
||||||
|
blackjack2 = environ.get("BLACKJACK2", "").strip()
|
||||||
FP = environ.get("FP", "").strip()
|
FP = environ.get("FP", "").strip()
|
||||||
KOFI_TOKEN = environ.get("KOFI_TOKEN", "").strip()
|
KOFI_TOKEN = environ.get("KOFI_TOKEN", "").strip()
|
||||||
KOFI_LINK = environ.get("KOFI_LINK", "").strip()
|
KOFI_LINK = environ.get("KOFI_LINK", "").strip()
|
||||||
|
@ -446,6 +447,7 @@ SNAKES_ID = 0
|
||||||
JUSTCOOL_ID = 0
|
JUSTCOOL_ID = 0
|
||||||
LAWLZ_ID = 0
|
LAWLZ_ID = 0
|
||||||
TGTW_ID = 0
|
TGTW_ID = 0
|
||||||
|
IDIO_ID = 0
|
||||||
|
|
||||||
MODMAIL_ID = 2
|
MODMAIL_ID = 2
|
||||||
GIFT_NOTIF_ID = 5
|
GIFT_NOTIF_ID = 5
|
||||||
|
@ -539,6 +541,7 @@ if SITE == 'rdrama.net':
|
||||||
JUSTCOOL_ID = 4999
|
JUSTCOOL_ID = 4999
|
||||||
LAWLZ_ID = 3833
|
LAWLZ_ID = 3833
|
||||||
TGTW_ID = 2008
|
TGTW_ID = 2008
|
||||||
|
IDIO_ID = 30
|
||||||
|
|
||||||
NOTIFIED_USERS = {
|
NOTIFIED_USERS = {
|
||||||
'aevan': AEVANN_ID,
|
'aevan': AEVANN_ID,
|
||||||
|
@ -559,9 +562,9 @@ if SITE == 'rdrama.net':
|
||||||
|
|
||||||
'joan': 28,
|
'joan': 28,
|
||||||
'pewkie': 28,
|
'pewkie': 28,
|
||||||
'idio3': 30,
|
'idio3': IDIO_ID,
|
||||||
'idio ': 30,
|
'idio ': IDIO_ID,
|
||||||
'telegram ': 30,
|
'telegram ': IDIO_ID,
|
||||||
'the_homocracy': 147,
|
'the_homocracy': 147,
|
||||||
'donger': 541,
|
'donger': 541,
|
||||||
'geese': 1710,
|
'geese': 1710,
|
||||||
|
@ -749,7 +752,7 @@ if SITE == 'rdrama.net':
|
||||||
REDDIT_NOTIFS_SITE.add('justice4darrell')
|
REDDIT_NOTIFS_SITE.add('justice4darrell')
|
||||||
REDDIT_NOTIFS_SITE.add('cringetopia.org')
|
REDDIT_NOTIFS_SITE.add('cringetopia.org')
|
||||||
REDDIT_NOTIFS_USERS = {
|
REDDIT_NOTIFS_USERS = {
|
||||||
'idio3': 30,
|
'idio3': IDIO_ID,
|
||||||
'aevann': AEVANN_ID,
|
'aevann': AEVANN_ID,
|
||||||
'carpflo': CARP_ID,
|
'carpflo': CARP_ID,
|
||||||
'carpathianflorist': CARP_ID,
|
'carpathianflorist': CARP_ID,
|
||||||
|
|
Loading…
Reference in New Issue