forked from rDrama/rDrama
users: filter shadowbanned from leaderboard
some of the non-simple leaderboards still have them in there, oh wellmaster
parent
471147080f
commit
dc1975fc61
|
@ -327,6 +327,8 @@ def transfer_bux(v, username):
|
||||||
@auth_required
|
@auth_required
|
||||||
def leaderboard(v):
|
def leaderboard(v):
|
||||||
users = g.db.query(User)
|
users = g.db.query(User)
|
||||||
|
if not v.can_see_shadowbanned:
|
||||||
|
users = users.filter(User.shadowbanned == None)
|
||||||
|
|
||||||
coins = Leaderboard("Coins", "coins", "coins", "Coins", None, Leaderboard.get_simple_lb, User.coins, v, lambda u:u.coins, g.db, users)
|
coins = Leaderboard("Coins", "coins", "coins", "Coins", None, Leaderboard.get_simple_lb, User.coins, v, lambda u:u.coins, g.db, users)
|
||||||
subscribers = Leaderboard("Followers", "followers", "followers", "Followers", None, Leaderboard.get_simple_lb, User.stored_subscriber_count, v, lambda u:u.stored_subscriber_count, g.db, users)
|
subscribers = Leaderboard("Followers", "followers", "followers", "Followers", None, Leaderboard.get_simple_lb, User.stored_subscriber_count, v, lambda u:u.stored_subscriber_count, g.db, users)
|
||||||
|
|
Loading…
Reference in New Issue