CityRP Documentation Repository

cityrp.legacy.gatekeeper

Connection gatekeeping: tracks connecting/connected clients and lets them be kicked before full spawn.

Functions

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

  1. { 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

  1. integer?The matching player's user ID, or nil if none was found.

Fields

ServergatekeeperSource ☍
Servergatekeeper.connectedSource ☍

User IDs whose disconnect should announce, keyed by user ID.

Servergatekeeper.spawningSource ☍

User IDs of clients that have connected but not yet spawned.