SourceMod SDK  1.7
SourceMod::IClientListener Class Reference

Provides callbacks for important client events. More...

#include <public/IPlayerHelpers.h>

Public Member Functions

virtual unsigned int GetClientListenerVersion ()
 Returns the current client listener version. More...
 
virtual bool InterceptClientConnect (int client, char *error, size_t maxlength)
 Called when a client requests connection. More...
 
virtual void OnClientConnected (int client)
 Called when a client has connected. More...
 
virtual void OnClientPutInServer (int client)
 Called when a client is put in server. More...
 
virtual void OnClientDisconnecting (int client)
 Called when a client is disconnecting (not fully disconnected yet). More...
 
virtual void OnClientDisconnected (int client)
 Called when a client has fully disconnected. More...
 
virtual void OnClientAuthorized (int client, const char *authstring)
 Called when a client has received authorization. More...
 
virtual void OnServerActivated (int max_clients)
 Called when the server is activated.
 
virtual bool OnClientPreAdminCheck (int client)
 Called once a client is authorized and fully in-game, but before admin checks are done. This can be used to override the default admin checks for a client. More...
 
virtual void OnClientPostAdminCheck (int client)
 Called once a client is authorized and fully in-game, and after all post-connection authorizations have been passed. If the client does not have an AdminId by this stage, it means that no admin entry was in the cache that matched, and the user could not be authenticated as an admin. More...
 
virtual void OnMaxPlayersChanged (int newvalue)
 Notifies the extension that the maxplayers value has changed. More...
 
virtual void OnClientSettingsChanged (int client)
 Notifies the extension that a clients settings changed. More...
 

Detailed Description

Provides callbacks for important client events.

Member Function Documentation

virtual unsigned int SourceMod::IClientListener::GetClientListenerVersion ( )
inlinevirtual

Returns the current client listener version.

Returns
Client listener version.
virtual bool SourceMod::IClientListener::InterceptClientConnect ( int  client,
char *  error,
size_t  maxlength 
)
inlinevirtual

Called when a client requests connection.

Parameters
clientIndex of the client.
errorError buffer for a disconnect reason.
maxlengthMaximum length of error buffer.
Returns
True to allow client, false to reject.
virtual void SourceMod::IClientListener::OnClientAuthorized ( int  client,
const char *  authstring 
)
inlinevirtual

Called when a client has received authorization.

Parameters
clientIndex of the client.
authstringClient Steam2 id, if available, else engine auth id.
virtual void SourceMod::IClientListener::OnClientConnected ( int  client)
inlinevirtual

Called when a client has connected.

Parameters
clientIndex of the client.
virtual void SourceMod::IClientListener::OnClientDisconnected ( int  client)
inlinevirtual

Called when a client has fully disconnected.

Parameters
clientIndex of the client.
virtual void SourceMod::IClientListener::OnClientDisconnecting ( int  client)
inlinevirtual

Called when a client is disconnecting (not fully disconnected yet).

Parameters
clientIndex of the client.
virtual void SourceMod::IClientListener::OnClientPostAdminCheck ( int  client)
inlinevirtual

Called once a client is authorized and fully in-game, and after all post-connection authorizations have been passed. If the client does not have an AdminId by this stage, it means that no admin entry was in the cache that matched, and the user could not be authenticated as an admin.

Parameters
clientClient index.
virtual bool SourceMod::IClientListener::OnClientPreAdminCheck ( int  client)
inlinevirtual

Called once a client is authorized and fully in-game, but before admin checks are done. This can be used to override the default admin checks for a client.

By default, this function allows the authentication process to continue as normal. If you need to delay the cache searching process in order to get asynchronous data, then return false here.

If you return false, you must call IPlayerManager::NotifyPostAdminCheck for the same client, or else the OnClientPostAdminCheck callback will never be called.

Parameters
clientClient index.
Returns
True to continue normally, false to override the authentication process.
virtual void SourceMod::IClientListener::OnClientPutInServer ( int  client)
inlinevirtual

Called when a client is put in server.

Parameters
clientIndex of the client.
virtual void SourceMod::IClientListener::OnClientSettingsChanged ( int  client)
inlinevirtual

Notifies the extension that a clients settings changed.

Parameters
clientClient index.
virtual void SourceMod::IClientListener::OnMaxPlayersChanged ( int  newvalue)
inlinevirtual

Notifies the extension that the maxplayers value has changed.

Parameters
newvalueNew maxplayers value.

The documentation for this class was generated from the following file: