diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 07:04:31 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 07:04:31 -0400 |
commit | bfc491bd5ae200b0a069045ba70de8635e34c287 (patch) | |
tree | bc6e8a85b4657fc781d14e371cfc1b66219ccac5 /pkg/api/api0/api.go | |
parent | f93a8ef70cbb31c1ff4eb805dab9a21cb2d0a1bb (diff) | |
download | Atlas-bfc491bd5ae200b0a069045ba70de8635e34c287.tar.gz Atlas-bfc491bd5ae200b0a069045ba70de8635e34c287.zip |
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.
Diffstat (limited to 'pkg/api/api0/api.go')
-rw-r--r-- | pkg/api/api0/api.go | 10 |
1 files changed, 0 insertions, 10 deletions
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 -} |