diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-07-25 00:46:24 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-07-25 00:46:36 +0200 |
commit | 8fd3afb00368d72cb1b6d79d15f6bb2ed115190f (patch) | |
tree | 2c5cfd92770674f5c21e14dda795bf1e1ec5ec55 /server.js | |
parent | 5cd0be37c9e7d420a99763409b144b6413f485ca (diff) | |
download | server-8fd3afb00368d72cb1b6d79d15f6bb2ed115190f.tar.gz |
Increase blacklist power.
Hide public games if any of the players who have already joined
have you on their blacklist (up from game creator only).
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1411,14 +1411,22 @@ const SQL_INSERT_REMATCH = SQL(` const QUERY_LIST_PUBLIC_GAMES_OPEN = SQL(` select * from game_view_public where status = 0 and join_count < player_count - and not exists ( select 1 from contacts where me = owner_id and you = ? and relation < 0 ) - order by mtime desc, ctime desc + and not exists ( + select 1 from players + join contacts on contacts.me=players.user_id + where players.game_id=game_view_public.game_id and you=? and relation < 0 + ) + order by game_id desc `) const QUERY_LIST_PUBLIC_GAMES_REPLACEMENT = SQL(` select * from game_view_public where status = 1 and join_count < player_count - and not exists ( select 1 from contacts where me = owner_id and you = ? and relation < 0 ) - order by mtime desc, ctime desc + and not exists ( + select 1 from players + join contacts on contacts.me=players.user_id + where players.game_id=game_view_public.game_id and you=? and relation < 0 + ) + order by game_id desc `) const QUERY_LIST_PUBLIC_GAMES_ACTIVE = SQL(` |