Pol  Rev 533
AccountObjImp Class Reference

#include <acscrobj.h>

+ Inheritance diagram for AccountObjImp:
+ Collaboration diagram for AccountObjImp:

List of all members.

Public Member Functions

 AccountObjImp (const AccountPtrHolder &other)
virtual BObjectImpcall_method (const char *methodname, Executor &ex)
virtual BObjectImpcall_method_id (const int id, Executor &ex, bool forcebuiltin=false)
virtual BObjectImpcopy () const
virtual BObjectRef get_member (const char *membername)
virtual BObjectRef get_member_id (const int id)
virtual const char * typeOf () const
virtual int typeOfInt () const

Private Types

typedef BApplicObj
< AccountPtrHolder
base

Detailed Description

Definition at line 30 of file acscrobj.h.


Member Typedef Documentation

Definition at line 32 of file acscrobj.h.


Constructor & Destructor Documentation

AccountObjImp::AccountObjImp ( const AccountPtrHolder other) [inline, explicit]

Definition at line 34 of file acscrobj.h.

Referenced by copy().

+ Here is the caller graph for this function:


Member Function Documentation

BObjectImp * AccountObjImp::call_method ( const char *  methodname,
Executor ex 
) [virtual]

[1] Account Scripting Object Methods

All methods except GetProp and GetCharacter return 1 on success All methods except GetProp and GetCharacter write the accounts.txt file on success. All methods return Error("Not enough parameters") if too few parameters were passed. All methods return Error("Invalid parameter type") if the wrong type was passed.

Reimplemented from BObjectImp.

Definition at line 522 of file acscrobj.cpp.

References call_method_id(), getKnownObjMethod(), and ObjMethod::id.

+ Here is the call graph for this function:

BObjectImp * AccountObjImp::call_method_id ( const int  id,
Executor ex,
bool  forcebuiltin = false 
) [virtual]

[1] Account Scripting Object Methods

All methods except GetProp and GetCharacter return 1 on success All methods except GetProp and GetCharacter write the accounts.txt file on success. All methods return Error("Not enough parameters") if too few parameters were passed. All methods return Error("Invalid parameter type") if the wrong type was passed.

account.Ban() : bans the account. Disconnects connected client if any.

account.Unban() : unbans the account.

account.Enable() : enables the account

account.Disable() : disables the account. Disconnects connected client if any.

account.SetPassword( newpassword : string ) : changes the password..

account.CheckPassword( password : string ) : checks if the password is valid

account.SetAcctName( newname : string ) : changes the account name

  • deprecated in favor of: account.SetName( newname : string ) : changes the account name ACK, bug - since account data is saved immediately, a crash w/o save will result in a server that can't start because account names in accounts.txt will refer to the old name

account.GetProp( propname : string ) : gets a custom account property returns Error( "Property not found" ) if property does not exist.

account.SetProp( propname : string, propval : packable ) : sets a custom account property

account.EraseProp( propname : string ) : erases a custom account property.

account.PropNames() : array of property names

account.GetCharacter( index : 1..5 ) : retrieve a reference to a character belonging to this account. This reference may be used even if the character is offline.

account.DeleteCharacter( index : 1..5 ) : delete a character character to be deleted cannot be logged in.

account.Set_UO_Expansion( string ) : recognized values: ML, SE, AOS, LBR, T2A (default) this determines what flag is sent with packet 0xB9 during login.

account.Delete() : delete this account

account.Split( newacctname : string, index : 1..5 ) : create a new account and move character to it

account.Move_Char( destacctname : string, index : 1..5 ) : move character from this account to destaccount

Reimplemented from BObjectImp.

Definition at line 79 of file acscrobj.cpp.

References PolConfig::account_save, accounts_txt_dirty, Character::acct, Account::active_character, Account::banned_, call_ondelete_scripts(), CallPropertyListMethod_id(), can_delete_character(), PolConfig::character_slots, Account::clear_character(), Character::client, cmdlevels2, config, Account::convert_uo_expansion(), BObjectImp::copy(), createchar2(), String::data(), Account::default_cmdlevel_, delete_account(), DELETE_BY_SCRIPT, delete_character(), Client::Disconnect(), duplicate_account(), Account::enabled_, find_account(), Account::get_character(), get_member(), Account::getnextfreeslot(), Executor::getParam(), Executor::getStringParam(), Executor::hasParams(), BObjectImp::isa(), Character::logged_in, MD5_Compare(), MD5_Encrypt(), MTH_ADD_CHARACTER, MTH_BAN, MTH_CHECKPASSWORD, MTH_DELETE, MTH_DELETECHARACTER, MTH_DISABLE, MTH_ENABLE, MTH_ERASEPROP, MTH_GET_MEMBER, MTH_GETCHARACTER, MTH_GETPROP, MTH_MOVE_CHAR, MTH_PROPNAMES, MTH_SET_UO_EXPANSION, MTH_SETDEFAULTCMDLEVEL, MTH_SETNAME, MTH_SETPASSWORD, MTH_SETPROP, MTH_SPLIT, MTH_UNBAN, Account::name(), Account::name_, Executor::numParams(), BApplicObj< AccountPtrHolder >::obj_, BObjectImp::OTUninit, Account::password_, Account::passwordhash_, Account::props_, AccountPtrHolder::Ptr(), PolConfig::retain_cleartext_passwords, send_feature_enable(), ref_ptr< T >::set(), Account::set_character(), Account::uo_expansion_, String::value(), and write_account_data().

Referenced by call_method().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectImp * AccountObjImp::copy ( void  ) const [virtual]

Implements BApplicObj< AccountPtrHolder >.

Definition at line 61 of file acscrobj.cpp.

References AccountObjImp(), and BApplicObj< AccountPtrHolder >::obj_.

+ Here is the call graph for this function:

BObjectRef AccountObjImp::get_member ( const char *  membername) [virtual]

Reimplemented from BObjectImp.

Definition at line 567 of file acscrobj.cpp.

References UninitObject::create(), get_member_id(), getKnownObjMember(), and ObjMember::id.

Referenced by call_method_id().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectRef AccountObjImp::get_member_id ( const int  id) [virtual]

[2] Account Scripting Object Members MemberName Type Access name string read-only enabled boolean read-only banned boolean read-only

Reimplemented from BObjectImp.

Definition at line 539 of file acscrobj.cpp.

References Account::banned(), UninitObject::create(), Account::default_cmdlevel_, Account::enabled(), MBR_BANNED, MBR_DEFAULTCMDLEVEL, MBR_ENABLED, MBR_NAME, MBR_UO_EXPANSION, MBR_USERNAMEPASSWORDHASH, Account::name(), BApplicObj< AccountPtrHolder >::obj_, Account::passwordhash(), and Account::uo_expansion().

Referenced by get_member().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const char * AccountObjImp::typeOf ( ) const [virtual]

Implements BApplicObj< AccountPtrHolder >.

Definition at line 52 of file acscrobj.cpp.

int AccountObjImp::typeOfInt ( ) const [virtual]

Implements BApplicObj< AccountPtrHolder >.

Definition at line 56 of file acscrobj.cpp.

References BObjectImp::OTAccountRef.


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