aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0/api.go
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 07:04:31 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 07:04:31 -0400
commitbfc491bd5ae200b0a069045ba70de8635e34c287 (patch)
treebc6e8a85b4657fc781d14e371cfc1b66219ccac5 /pkg/api/api0/api.go
parentf93a8ef70cbb31c1ff4eb805dab9a21cb2d0a1bb (diff)
downloadAtlas-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.go10
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
-}