HolyLib Wiki

HolyLib:GetFreeClient

 CGameClient HolyLib:GetFreeClient( string ip )

Description

Called when the engine looks for a free client slot for a connecting address, allowing you to fully override which CGameClient gets used.

This hook is not called from gameserver.GetFreeClient itself, to prevent infinite recursion.

Arguments

1string ip

The address that is looking for a free client. Format ip:port

Returns

1CGameClient client = nil

Return a client to use it as the free client instead of the engine's own search.
If the returned client is already connected, it is ignored and the engine performs its normal search instead - unless unsafe code is enabled, in which case the client is forcefully disconnected and used anyway.