forked from MarseyWorld/MarseyWorld
far
parent
9ef50cc5e4
commit
b31ffc6de6
|
@ -129,7 +129,7 @@ if SITE in {'rdrama.net','devrama.xyz'}:
|
||||||
KIPPY_ID = 7150
|
KIPPY_ID = 7150
|
||||||
GIFT_NOTIF_ID = 995
|
GIFT_NOTIF_ID = 995
|
||||||
PIZZASHILL_ID = 2424
|
PIZZASHILL_ID = 2424
|
||||||
PIZZASHILLSHILL_ID = 9712
|
PIZZA_VOTERS = (1,747,1963,9712)
|
||||||
IDIO_ID = 30
|
IDIO_ID = 30
|
||||||
CARP_ID = 995
|
CARP_ID = 995
|
||||||
JOAN_ID = 28
|
JOAN_ID = 28
|
||||||
|
@ -159,7 +159,7 @@ elif SITE == "pcmemes.net":
|
||||||
A_ID = 0
|
A_ID = 0
|
||||||
KIPPY_ID = 1592
|
KIPPY_ID = 1592
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
PIZZASHILLSHILL_ID = 0
|
PIZZA_VOTERS = ()
|
||||||
GIFT_NOTIF_ID = 1592
|
GIFT_NOTIF_ID = 1592
|
||||||
IDIO_ID = 0
|
IDIO_ID = 0
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
|
@ -191,7 +191,7 @@ else:
|
||||||
KIPPY_ID = 0
|
KIPPY_ID = 0
|
||||||
GIFT_NOTIF_ID = 9
|
GIFT_NOTIF_ID = 9
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
PIZZASHILLSHILL_ID = 0
|
PIZZA_VOTERS = ()
|
||||||
IDIO_ID = 0
|
IDIO_ID = 0
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
JOAN_ID = 0
|
JOAN_ID = 0
|
||||||
|
|
|
@ -6,9 +6,10 @@ if "load_chat" in sys.argv:
|
||||||
from files.helpers.sanitize import sanitize
|
from files.helpers.sanitize import sanitize
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask_socketio import SocketIO, emit
|
from flask_socketio import SocketIO, emit
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter, r
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
import sys
|
import sys
|
||||||
|
import atexit
|
||||||
|
|
||||||
socketio = SocketIO(app, async_mode='gevent', cors_allowed_origins=[SITE_FULL])
|
socketio = SocketIO(app, async_mode='gevent', cors_allowed_origins=[SITE_FULL])
|
||||||
typing = []
|
typing = []
|
||||||
|
@ -70,4 +71,9 @@ if "load_chat" in sys.argv:
|
||||||
elif not data and v.username in typing: typing.remove(v.username)
|
elif not data and v.username in typing: typing.remove(v.username)
|
||||||
|
|
||||||
emit('typing', typing, broadcast=True)
|
emit('typing', typing, broadcast=True)
|
||||||
return '', 204
|
return '', 204
|
||||||
|
|
||||||
|
|
||||||
|
def close_running_threads():
|
||||||
|
r.set('chat', messages)
|
||||||
|
atexit.register(close_running_threads)
|
|
@ -658,12 +658,9 @@ def api_comment(v):
|
||||||
c.voted = 1
|
c.voted = 1
|
||||||
|
|
||||||
if v.id == PIZZASHILL_ID:
|
if v.id == PIZZASHILL_ID:
|
||||||
autovote = CommentVote(user_id=CARP_ID, comment_id=c.id, vote_type=1)
|
for uid in PIZZA_VOTERS:
|
||||||
g.db.add(autovote)
|
autovote = CommentVote(user_id=uid, comment_id=c.id, vote_type=1)
|
||||||
autovote = CommentVote(user_id=AEVANN_ID, comment_id=c.id, vote_type=1)
|
g.db.add(autovote)
|
||||||
g.db.add(autovote)
|
|
||||||
autovote = CommentVote(user_id=PIZZASHILLSHILL_ID, comment_id=c.id, vote_type=1)
|
|
||||||
g.db.add(autovote)
|
|
||||||
v.coins += 3
|
v.coins += 3
|
||||||
v.truecoins += 3
|
v.truecoins += 3
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -1300,12 +1300,9 @@ def submit_post(v, sub=None):
|
||||||
cache.delete_memoized(changeloglist)
|
cache.delete_memoized(changeloglist)
|
||||||
|
|
||||||
if v.id == PIZZASHILL_ID:
|
if v.id == PIZZASHILL_ID:
|
||||||
autovote = Vote(user_id=CARP_ID, submission_id=post.id, vote_type=1)
|
for uid in PIZZA_VOTERS:
|
||||||
g.db.add(autovote)
|
autovote = Vote(user_id=uid, submission_id=post.id, vote_type=1)
|
||||||
autovote = Vote(user_id=AEVANN_ID, submission_id=post.id, vote_type=1)
|
g.db.add(autovote)
|
||||||
g.db.add(autovote)
|
|
||||||
autovote = Vote(user_id=PIZZASHILLSHILL_ID, submission_id=post.id, vote_type=1)
|
|
||||||
g.db.add(autovote)
|
|
||||||
v.coins += 3
|
v.coins += 3
|
||||||
v.truecoins += 3
|
v.truecoins += 3
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
Loading…
Reference in New Issue