Pol  Revision:4b29d2b
Pol::Accounts::Account Class Reference

#include <account.h>

+ Inheritance diagram for Pol::Accounts::Account:

Public Member Functions

 Account (Clib::ConfigElem &elem)
 
 ~Account ()
 
bool banned () const
 
void clear_character (int index)
 
unsigned char default_cmdlevel () const
 
std::string default_privlist () const
 
bool enabled () const
 
size_t estimatedSize () const
 
Mobile::Characterget_character (int index)
 
int getnextfreeslot () const
 
bool has_active_characters ()
 Returns true if at least one character from this account is already logged in. More...
 
const char * name () const
 
int numchars () const
 
const std::string password () const
 
const std::string passwordhash () const
 
void readfrom (Clib::ConfigElem &elem)
 
void set_character (int index, Mobile::Character *chr)
 
void set_password (std::string newpass)
 
void set_passwordhash (std::string newpass)
 
const std::string uo_expansion () const
 
unsigned short uo_expansion_flag () const
 
void writeto (Clib::StreamWriter &sw) const
 
void writeto (Clib::ConfigElem &elem) const
 
- Public Member Functions inherited from ref_counted
unsigned int add_ref ()
 
unsigned int count () const
 
unsigned int release ()
 

Static Public Member Functions

static unsigned short convert_uo_expansion (const std::string &expansion)
 

Private Attributes

bool banned_
 
std::vector< Core::CharacterRefcharacters_
 
unsigned char default_cmdlevel_
 
Clib::StringSet default_privs_
 
bool enabled_
 
std::string name_
 
Clib::StringSet options_
 
std::string password_
 
std::string passwordhash_
 
Core::PropertyList props_
 
unsigned short uo_expansion_
 

Friends

class AccountObjImp
 

Additional Inherited Members

- Protected Member Functions inherited from ref_counted
 ref_counted ()
 
 ~ref_counted ()=default
 
- Protected Attributes inherited from ref_counted
std::atomic< unsigned int > _count
 

Detailed Description

Definition at line 29 of file account.h.

Constructor & Destructor Documentation

Pol::Accounts::Account::Account ( Clib::ConfigElem elem)
explicit
Pol::Accounts::Account::~Account ( )

Member Function Documentation

bool Pol::Accounts::Account::banned ( ) const

Definition at line 272 of file account.cpp.

References banned_.

Referenced by Pol::Core::login2(), and Pol::Core::loginserver_login().

void Pol::Accounts::Account::clear_character ( int  index)
u16 Pol::Accounts::Account::convert_uo_expansion ( const std::string &  expansion)
static
unsigned char Pol::Accounts::Account::default_cmdlevel ( ) const
std::string Pol::Accounts::Account::default_privlist ( ) const
bool Pol::Accounts::Account::enabled ( ) const

Definition at line 267 of file account.cpp.

References enabled_.

Referenced by Pol::Core::login2(), and Pol::Core::loginserver_login().

size_t Pol::Accounts::Account::estimatedSize ( ) const
int Pol::Accounts::Account::getnextfreeslot ( ) const
bool Pol::Accounts::Account::has_active_characters ( )
int Pol::Accounts::Account::numchars ( ) const
const std::string Pol::Accounts::Account::password ( ) const

Definition at line 198 of file account.cpp.

References password_.

Referenced by Pol::Core::login2(), and Pol::Core::loginserver_login().

const std::string Pol::Accounts::Account::passwordhash ( ) const

Definition at line 203 of file account.cpp.

References passwordhash_.

Referenced by Pol::Core::login2(), and Pol::Core::loginserver_login().

void Pol::Accounts::Account::set_character ( int  index,
Mobile::Character chr 
)
void Pol::Accounts::Account::set_password ( std::string  newpass)
inline

Definition at line 62 of file account.h.

Referenced by Pol::Core::login2(), and Pol::Core::loginserver_login().

void Pol::Accounts::Account::set_passwordhash ( std::string  newpass)
inline

Definition at line 63 of file account.h.

const std::string Pol::Accounts::Account::uo_expansion ( ) const
unsigned short Pol::Accounts::Account::uo_expansion_flag ( ) const

Definition at line 235 of file account.cpp.

References uo_expansion_.

Referenced by Pol::Core::send_feature_enable().

Friends And Related Function Documentation

friend class AccountObjImp
friend

Definition at line 63 of file account.h.

Member Data Documentation

bool Pol::Accounts::Account::banned_
private

Definition at line 73 of file account.h.

Referenced by banned(), readfrom(), and writeto().

std::vector<Core::CharacterRef> Pol::Accounts::Account::characters_
private
unsigned char Pol::Accounts::Account::default_cmdlevel_
private

Definition at line 76 of file account.h.

Referenced by default_cmdlevel(), readfrom(), and writeto().

Clib::StringSet Pol::Accounts::Account::default_privs_
private

Definition at line 75 of file account.h.

Referenced by default_privlist(), estimatedSize(), readfrom(), and writeto().

bool Pol::Accounts::Account::enabled_
private

Definition at line 72 of file account.h.

Referenced by enabled(), readfrom(), and writeto().

std::string Pol::Accounts::Account::name_
private

Definition at line 68 of file account.h.

Referenced by estimatedSize(), name(), readfrom(), and writeto().

Clib::StringSet Pol::Accounts::Account::options_
private

Definition at line 78 of file account.h.

Referenced by estimatedSize().

std::string Pol::Accounts::Account::password_
private

Definition at line 69 of file account.h.

Referenced by estimatedSize(), password(), readfrom(), and writeto().

std::string Pol::Accounts::Account::passwordhash_
private

Definition at line 70 of file account.h.

Referenced by estimatedSize(), passwordhash(), readfrom(), and writeto().

Core::PropertyList Pol::Accounts::Account::props_
private

Definition at line 74 of file account.h.

Referenced by estimatedSize(), readfrom(), and writeto().

unsigned short Pol::Accounts::Account::uo_expansion_
private

Definition at line 71 of file account.h.

Referenced by readfrom(), uo_expansion(), uo_expansion_flag(), and writeto().


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