OnClientConnect Forward

Called on client connection. If you return true, the client will be allowed in the server. If you return false (or return nothing), the client will be rejected. If the client is rejected by this forward or any other, OnClientDisconnect will not be called.

Note: Do not write to rejectmsg if you plan on returning true. If multiple plugins write to the string buffer, it is not defined which plugin's string will be shown to the client, but it is guaranteed one of them will.

bool OnClientConnect(int client, char[] rejectmsg, int maxlen)

Parameters

int client

Client index.

char[] rejectmsg

Buffer to store the rejection message when the connection is refused.

int maxlen

Maximum number of characters for rejection buffer.

Return Value

True to validate client's connection, false to refuse it.