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