forked from MarseyWorld/MarseyWorld
constantify a bunch of things
* sign up follow id is now a thing (if not specified will just msg carp instead) * notification thread id is also a constant now * blackjackbtz id is a constant, used for i think special PM handlingmaster
parent
8700bcc5ee
commit
f872f734ec
|
@ -307,6 +307,7 @@ DAD_ID = 0
|
|||
MOM_ID = 0
|
||||
DONGER_ID = 0
|
||||
GEESE_ID = 0
|
||||
BLACKJACKBTZ_ID = 0
|
||||
|
||||
POLL_THREAD = 0
|
||||
POLL_BET_COINS = 200
|
||||
|
@ -323,6 +324,8 @@ BANNER_THREAD = 0
|
|||
BADGE_THREAD = 0
|
||||
SNAPPY_THREAD = 0
|
||||
GIFT_NOTIF_ID = 5
|
||||
SIGNUP_FOLLOW_ID = 0
|
||||
NOTIFICATION_THREAD = 1
|
||||
|
||||
if SITE == 'rdrama.net':
|
||||
FEATURES['PRONOUNS'] = True
|
||||
|
@ -333,6 +336,7 @@ if SITE == 'rdrama.net':
|
|||
BANNER_THREAD = 37697
|
||||
BADGE_THREAD = 37833
|
||||
SNAPPY_THREAD = 37749
|
||||
NOTIFICATION_THREAD = 6489
|
||||
|
||||
HOLE_COST = 50000
|
||||
HOLE_INACTIVITY_DELETION = True
|
||||
|
@ -363,6 +367,7 @@ if SITE == 'rdrama.net':
|
|||
MOM_ID = 4588
|
||||
DONGER_ID = 541
|
||||
GEESE_ID = 1710
|
||||
BLACKJACKBTZ_ID = 12732
|
||||
|
||||
GIFT_NOTIF_ID = CARP_ID
|
||||
|
||||
|
@ -395,7 +400,9 @@ elif SITE == 'pcmemes.net':
|
|||
BASEDBOT_ID = 800
|
||||
|
||||
KIPPY_ID = 1592
|
||||
GIFT_NOTIF_ID = 1592
|
||||
GIFT_NOTIF_ID = KIPPY_ID
|
||||
SIGNUP_FOLLOW_ID = KIPPY_ID
|
||||
NOTIFICATION_THREAD = 2487
|
||||
CARP_ID = 13
|
||||
AEVANN_ID = 1
|
||||
SNAKES_ID = 2279
|
||||
|
@ -431,6 +438,7 @@ elif SITE == 'watchpeopledie.co':
|
|||
SNAKES_ID = 32
|
||||
|
||||
GIFT_NOTIF_ID = CARP_ID
|
||||
SIGNUP_FOLLOW_ID = CARP_ID
|
||||
|
||||
else: # localhost or testing environment implied
|
||||
FEATURES['PRONOUNS'] = True
|
||||
|
|
|
@ -51,9 +51,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
|
|||
|
||||
if not pid:
|
||||
if comment.parent_submission: pid = comment.parent_submission
|
||||
elif SITE_NAME == 'rDrama': pid = 6489
|
||||
elif SITE == 'pcmemes.net': pid = 2487
|
||||
else: pid = 1
|
||||
else: pid = NOTIFICATION_THREAD
|
||||
|
||||
post = get_post(pid, v=v)
|
||||
|
||||
|
|
|
@ -374,22 +374,15 @@ def sign_up_post(v):
|
|||
|
||||
session["lo_user"] = new_user.id
|
||||
|
||||
if SITE == 'rdrama.net':
|
||||
if SIGNUP_FOLLOW_ID:
|
||||
signup_autofollow = get_account(SIGNUP_FOLLOW_ID)
|
||||
new_follow = Follow(user_id=new_user.id, target_id=signup_autofollow.id)
|
||||
g.db.add(new_follow)
|
||||
signup_autofollow.stored_subscriber_count += 1
|
||||
g.db.add(signup_autofollow)
|
||||
send_notification(signup_autofollow.id, f"A new user - @{new_user.username} - has followed you automatically!")
|
||||
elif CARP_ID:
|
||||
send_notification(CARP_ID, f"A new user - @{new_user.username} - has signed up!")
|
||||
if SITE == 'watchpeopledie.co':
|
||||
carp = get_account(CARP_ID)
|
||||
new_follow = Follow(user_id=new_user.id, target_id=carp.id)
|
||||
g.db.add(new_follow)
|
||||
carp.stored_subscriber_count += 1
|
||||
g.db.add(carp)
|
||||
send_notification(carp.id, f"A new user - @{new_user.username} - has followed you automatically!")
|
||||
if SITE == 'pcmemes.net':
|
||||
kippy = get_account(KIPPY_ID)
|
||||
new_follow = Follow(user_id=new_user.id, target_id=kippy.id)
|
||||
g.db.add(new_follow)
|
||||
kippy.stored_subscriber_count += 1
|
||||
g.db.add(kippy)
|
||||
send_notification(kippy.id, f"A new user - @{new_user.username} - has followed you automatically!")
|
||||
|
||||
redir = request.values.get("redirect")
|
||||
if redir:
|
||||
|
|
|
@ -506,7 +506,7 @@ def message2(v, username):
|
|||
|
||||
body_html = sanitize(message)
|
||||
|
||||
if not (SITE == 'rdrama.net' and user.id == 12732):
|
||||
if not (SITE == 'rdrama.net' and user.id == BLACKJACKBTZ_ID):
|
||||
existing = g.db.query(Comment.id).filter(Comment.author_id == v.id,
|
||||
Comment.sentto == user.id,
|
||||
Comment.body_html == body_html,
|
||||
|
|
Loading…
Reference in New Issue