Phasor  01.00.10.059
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Enumerations | Functions | Variables
Admin Namespace Reference

Namespaces

namespace  access
 
namespace  admin
 

Enumerations

enum  result_t {
  E_OK = 0, E_HASH_INUSE, E_LEVEL_NOT_EXIST, E_NAME_INUSE,
  E_NOT_ADMIN, E_NOT_ALLOWED
}
 

Functions

bool isChallengeEnabled ()
 
result_t add (const std::string &hash, const std::string &authname, int level)
 
void remove (const std::string &hash)
 
bool isAdmin (const std::string &hash)
 
bool getLevel (const std::string &hash, int *level)
 
result_t canUseCommand (const std::string &hash, const std::string &command, std::string *authName)
 
void LoadAccessList (const std::wstring &waccessPath)
 
void LoadAdminList (const std::wstring adminPath, COutStream *out)
 
bool SaveAdminList (COutStream &stream)
 
void initialize (COutStream *out)
 
void reload ()
 
void MarkPlayerAdmin (const std::string &hash, bool is_admin)
 
e_command_result sv_admin_add (void *, commands::CArgParser &args, COutStream &out)
 Make the specified player (or hash) an admin.
 
e_command_result sv_admin_del (void *, commands::CArgParser &args, COutStream &out)
 Revoke a current admin's status.
 
e_command_result sv_admin_list (void *, commands::CArgParser &args, COutStream &out)
 Lists all admins.
 
e_command_result sv_admin_cur (void *, commands::CArgParser &args, COutStream &out)
 Lists all admins who are currently in the server.
 
e_command_result sv_admin_reload (void *, commands::CArgParser &args, COutStream &out)
 Reload both the access and admin files.
 
e_command_result sv_commands (void *player, commands::CArgParser &args, COutStream &out)
 Lists the commands you have permission to use.
 
e_command_result sv_admin_check (void *, commands::CArgParser &args, COutStream &out)
 Enables/Disables forced-hash checking. This protects against people attempting to steal an admin's hash, an admin won't be marked as such until the response from gamespy is received.
 
e_command_result sv_public (void *, commands::CArgParser &args, COutStream &out)
 

Variables

std::wstring adminPath
 
std::wstring accessPath
 
bool challenge_admins = true
 

Enumeration Type Documentation

Enumerator
E_OK 
E_HASH_INUSE 
E_LEVEL_NOT_EXIST 
E_NAME_INUSE 
E_NOT_ADMIN 
E_NOT_ALLOWED 

Function Documentation

result_t Admin::add ( const std::string &  hash,
const std::string &  authname,
int  level 
)
result_t Admin::canUseCommand ( const std::string &  hash,
const std::string &  command,
std::string *  authName 
)
bool Admin::getLevel ( const std::string &  hash,
int *  level 
)
void Admin::initialize ( COutStream out)
bool Admin::isAdmin ( const std::string &  hash)
bool Admin::isChallengeEnabled ( )
void Admin::LoadAccessList ( const std::wstring &  waccessPath)
void Admin::LoadAdminList ( const std::wstring  adminPath,
COutStream out 
)
void Admin::MarkPlayerAdmin ( const std::string &  hash,
bool  is_admin 
)
void Admin::reload ( )
void Admin::remove ( const std::string &  hash)
bool Admin::SaveAdminList ( COutStream stream)
e_command_result Admin::sv_admin_add ( void *  ,
commands::CArgParser args,
COutStream out 
)

Make the specified player (or hash) an admin.

Parameters
player_or_hashEither the player's in game id or their hash.
authnameThe name to auth the player under.
levelThe level the player should have access to.

Example usage: sv_admin_add 1 Oxide 0

e_command_result Admin::sv_admin_check ( void *  ,
commands::CArgParser args,
COutStream out 
)

Enables/Disables forced-hash checking. This protects against people attempting to steal an admin's hash, an admin won't be marked as such until the response from gamespy is received.

e_command_result Admin::sv_admin_cur ( void *  ,
commands::CArgParser args,
COutStream out 
)

Lists all admins who are currently in the server.

Example usage: sv_admin_cur

e_command_result Admin::sv_admin_del ( void *  ,
commands::CArgParser args,
COutStream out 
)

Revoke a current admin's status.

Parameters
nameThe name of the admin to remove.

Example usage: sv_admin_del Oxide

e_command_result Admin::sv_admin_list ( void *  ,
commands::CArgParser args,
COutStream out 
)

Lists all admins.

Example usage: sv_admin_list

e_command_result Admin::sv_admin_reload ( void *  ,
commands::CArgParser args,
COutStream out 
)

Reload both the access and admin files.

Example usage: sv_admin_reload

e_command_result Admin::sv_commands ( void *  player,
commands::CArgParser args,
COutStream out 
)

Lists the commands you have permission to use.

Example usage: sv_commands

e_command_result Admin::sv_public ( void *  ,
commands::CArgParser args,
COutStream out 
)

Variable Documentation

std::wstring Admin::accessPath
std::wstring Admin::adminPath
bool Admin::challenge_admins = true