#include <public/IPlayerHelpers.h>
Public Member Functions | |
| virtual const char * | GetName ()=0 |
| Returns the player's name. | |
| virtual const char * | GetIPAddress ()=0 |
| Returns the player's IP address. | |
| virtual const char * | GetAuthString ()=0 |
| Returns the player's authentication string. | |
| virtual edict_t * | GetEdict ()=0 |
| Returns the player's edict_t structure. | |
| virtual bool | IsInGame ()=0 |
| Returns whether the player is in game (putinserver). | |
| virtual bool | IsConnected ()=0 |
| Returns whether the player is connected. | |
| virtual bool | IsFakeClient ()=0 |
| Returns whether the player is a fake client. | |
| virtual AdminId | GetAdminId ()=0 |
| Returns the client's AdminId, if any. | |
| virtual void | SetAdminId (AdminId id, bool temp)=0 |
| Sets the client's AdminId. | |
| virtual int | GetUserId ()=0 |
| Returns the client's userid. | |
| virtual unsigned int | GetLanguageId ()=0 |
| Returns the client's language id. | |
| virtual IPlayerInfo * | GetPlayerInfo ()=0 |
| Returns a player's IPlayerInfo object, if any. | |
| virtual bool | RunAdminCacheChecks ()=0 |
| Runs through Core's admin authorization checks. If the client is already an admin, no checks are performed. | |
| virtual void | NotifyPostAdminChecks ()=0 |
| Notifies all listeners that the client has completed all of your post-connection (in-game, auth, admin) checks. | |
Definition at line 57 of file IPlayerHelpers.h.
| virtual const char* SourceMod::IGamePlayer::GetName | ( | ) | [pure virtual] |
Returns the player's name.
| virtual const char* SourceMod::IGamePlayer::GetIPAddress | ( | ) | [pure virtual] |
Returns the player's IP address.
| virtual const char* SourceMod::IGamePlayer::GetAuthString | ( | ) | [pure virtual] |
Returns the player's authentication string.
| virtual edict_t* SourceMod::IGamePlayer::GetEdict | ( | ) | [pure virtual] |
Returns the player's edict_t structure.
| virtual bool SourceMod::IGamePlayer::IsInGame | ( | ) | [pure virtual] |
Returns whether the player is in game (putinserver).
| virtual bool SourceMod::IGamePlayer::IsConnected | ( | ) | [pure virtual] |
Returns whether the player is connected.
Note: If this returns true, all above functions except for GetAuthString() should return non-NULL results.
| virtual bool SourceMod::IGamePlayer::IsFakeClient | ( | ) | [pure virtual] |
Returns whether the player is a fake client.
| virtual AdminId SourceMod::IGamePlayer::GetAdminId | ( | ) | [pure virtual] |
Returns the client's AdminId, if any.
| virtual void SourceMod::IGamePlayer::SetAdminId | ( | AdminId | id, | |
| bool | temp | |||
| ) | [pure virtual] |
Sets the client's AdminId.
| id | AdminId to set. | |
| temp | If true, the id will be invalidated on disconnect. |
| virtual int SourceMod::IGamePlayer::GetUserId | ( | ) | [pure virtual] |
Returns the client's userid.
| virtual unsigned int SourceMod::IGamePlayer::GetLanguageId | ( | ) | [pure virtual] |
Returns the client's language id.
| virtual IPlayerInfo* SourceMod::IGamePlayer::GetPlayerInfo | ( | ) | [pure virtual] |
Returns a player's IPlayerInfo object, if any.
| virtual bool SourceMod::IGamePlayer::RunAdminCacheChecks | ( | ) | [pure virtual] |
Runs through Core's admin authorization checks. If the client is already an admin, no checks are performed.
Note that this function operates solely against the in-memory admin cache. It will check steamids, IPs, names, and verify a password if one exists. To implement other authentication schemes, simply don't call this function and use IGamePlayer::SetAdminId() instead.
| virtual void SourceMod::IGamePlayer::NotifyPostAdminChecks | ( | ) | [pure virtual] |
Notifies all listeners that the client has completed all of your post-connection (in-game, auth, admin) checks.
If you returned "false" from OnClientPreAdminCheck(), you must ALWAYS manually invoke this function, even if RunAdminCacheChecks() failed or you did not assign an AdminId. Failure to call this function could result in plugins (such as reservedslots) not working properly.
If you are implementing asynchronous fetches, and the client disconnects during your fetching process, you should make sure to recognize that case and not call this function. That is, do not call this function on mismatched PreCheck calls, or on disconnected clients. A good way to check this is to pass userids around, which are unique per client connection.
Calling this has no effect if it has already been called on the given client (thus it is safe for multiple asynchronous plugins to call it at various times).
1.5.1