Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
add terminated account filter
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsupermanhd committed Oct 10, 2024
1 parent 1c51642 commit 9f12084
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions connfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@ where g.game_time < 60000 and g.time_started + $1::interval > now() and (i.pkey
}
}

// stage 6 terminated account
var terminated bool
dbpool.QueryRow(context.Background(), `select terminated
from accounts as a
join identities as i on i.account = a.id
where i.pkey = $1`, pubkey).Scan(&terminated)
if terminated {
if action == joinCheckActionLevelApprove {
jd.Messages = append(jd.Messages, "You not allowed to participate in the game because your account was terminated. Contact administration for more details.")
action = joinCheckActionLevelApproveSpec
}
}

inst.logger.Printf("connfilter resolved key %v nljoin %v (acc %v) nlplay %v (action %v) nlchat %v (allowed %v)",
pubkeyB64,
allowNonLinkedJoin, account,
Expand Down

0 comments on commit 9f12084

Please sign in to comment.