cityrp.legacy.gatekeeper
Connection gatekeeping: tracks connecting/connected clients and lets them be kicked before full spawn.
- Servergatekeeper.Drop(userid, reason)Source ☍
-
Kicks a client by their user ID.
Parameters
- useridintegerThe user ID of the client to kick.
- reasonstringThe kick reason shown to the client.
- Servergatekeeper.DropAllClients(reason)Source ☍
-
Kicks every connecting and connected client.
Parameters
- reasonstringThe kick reason shown to each client.
- Servergatekeeper.GetNumClients() → { spawning: integer, active: integer, total: integer }Source ☍
-
Gets a breakdown of connecting/active/total client counts.
Returns
- { spawning: integer, active: integer, total: integer }The client count breakdown.
- Servergatekeeper.GetUserByAddress(addr) → integer?Source ☍
-
Finds a connected player's user ID by their IP address.
Parameters
- addrstringThe IP address to search for.
Returns
- integer?The matching player's user ID, or nil if none was found.