From bfc491bd5ae200b0a069045ba70de8635e34c287 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Sat, 15 Oct 2022 07:04:31 -0400 Subject: pkg/api/api0: Refactor server list updates * Merge update and replace into ServerHybridUpdatePut. * Integrate limits into ServerList itself. * Allow new servers to replace live servers if gameserver and authserver IP and port are identical. * Move server token generation into ServerList. --- pkg/api/api0/api.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'pkg/api/api0/api.go') diff --git a/pkg/api/api0/api.go b/pkg/api/api0/api.go index af3505a..3f84238 100644 --- a/pkg/api/api0/api.go +++ b/pkg/api/api0/api.go @@ -212,13 +212,3 @@ func marshalJSONBytesAsArray(b []byte) json.RawMessage { e.WriteByte(']') return json.RawMessage(e.Bytes()) } - -func checkLimit(limit, def, cur int) bool { - if limit == -1 { - return true - } - if limit == 0 && cur < def { - return true - } - return cur < limit -} -- cgit v1.2.3