HolyLib Wiki

gameserver.GetFreeClient

 CGameClient gameserver.GetFreeClient( string ip, boolean useDNS, boolean noQueueLookup = false )

Description

Finds (or creates) a free client slot for the given address, this is the same lookup the engine performs internally whenever a new player connects.

Calling this function will not trigger the HolyLib:GetFreeClient hook, to prevent infinite recursion.

Arguments

1string ip

The address to look up / assign the free client for. Format ip:port

2boolean useDNS

If true it will try to resolve the IP

3boolean noQueueLookup = false

If true, HolyLib's queue client fallback (see gameserver.GetFreeQueueClient) is skipped when the engine has no regular free client left

Returns

1CGameClient client

The found/created free client or nil on failure