summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-12 00:43:17 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-12 12:04:43 +0100
commit2b0ffdbba7f00ed9e34a1b27ceaae11b202dd0ed (patch)
treea65e85f82efbe39ca116674a4258284bcf77c23e /schema.sql
parenta764abe6565544bea8591b26839ad931f3f42e4d (diff)
downloadserver-2b0ffdbba7f00ed9e34a1b27ceaae11b202dd0ed.tar.gz
Games that time out should result in "None" instead of resign.
Clean up resignation handling. Prepare for collectively abandoning games as well.
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index 5fd189e..041761b 100644
--- a/schema.sql
+++ b/schema.sql
@@ -173,6 +173,7 @@ create view rated_games_view as
and moves >= player_count * 3
and user_count = player_count
and player_count > 1
+ and result != 'None'
and not exists (
select 1 from players where players.game_id = games.game_id and user_id = 0
)
@@ -720,6 +721,7 @@ begin
set score = (
case
when new.result is null then null
+ when new.result = 'None' then null
when new.result = role then 2
when new.result = 'Draw' then 1
when instr(new.result, role) then 1