OnClientConnectionRequest

From Onset Developer Wiki
Revision as of 11:29, 1 September 2020 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
OnClientConnectionRequest

Type: Event
Context: Server
Introduced: v1.0

Description

Early callback of when a client tries to connect to the server. Client is not fully authorized by the server in this state. You can return false in this event to disconnect the client immediately.

Syntax

OnClientConnectionRequest(ip, port)

Parameters

  • ip
    IP address of the client connecting.
  • port
    Port of the client connecting. This is not the server port.

Example

AddEvent("OnClientConnectionRequest", function(ip, port)
    -- you can check for blacklisted IP and return false to stop them!
end)

See also