Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
account_commandscript Class Reference
Inheritance diagram for account_commandscript:
Collaboration diagram for account_commandscript:

Public Member Functions

 account_commandscript ()
std::vector< ChatCommandGetCommands () const OVERRIDE
Public Member Functions inherited from ScriptObject
const std::string & GetName () const
virtual bool IsDatabaseBound () const

Static Public Member Functions

static bool HandleAccountAddonCommand (ChatHandler *handler, char const *args)
static bool HandleAccountBoostAddCommand (ChatHandler *handler, char const *args)
static bool HandleAccountBoostDelCommand (ChatHandler *handler, char const *args)
static bool HandleAccountCommand (ChatHandler *handler, char const *)
static bool HandleAccountCreateCommand (ChatHandler *handler, char const *args)
 Create an account.
static bool HandleAccountDeleteCommand (ChatHandler *handler, char const *args)
static bool HandleAccountEmailCommand (ChatHandler *handler, char const *args)
static bool HandleAccountLockCountryCommand (ChatHandler *handler, char const *args)
static bool HandleAccountLockIpCommand (ChatHandler *handler, char const *args)
static bool HandleAccountOnlineListCommand (ChatHandler *handler, char const *)
 Display info on users currently in the realm.
static bool HandleAccountPasswordCommand (ChatHandler *handler, char const *args)
static bool HandleAccountSetAddonCommand (ChatHandler *handler, char const *args)
 Set/Unset the expansion level for an account.
static bool HandleAccountSetEmailCommand (ChatHandler *handler, char const *args)
 Set normal email for account.
static bool HandleAccountSetGmLevelCommand (ChatHandler *handler, char const *args)
static bool HandleAccountSetPasswordCommand (ChatHandler *handler, char const *args)
 Set password for account.
static bool HandleAccountSetRegEmailCommand (ChatHandler *handler, char const *args)
 Change registration email for account.

Additional Inherited Members

Protected Member Functions inherited from CommandScript
 CommandScript (const char *name)
Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
virtual ~ScriptObject ()

Detailed Description

Definition at line 20 of file cs_account.cpp.

Constructor & Destructor Documentation

◆ account_commandscript()

account_commandscript::account_commandscript ( )
inline

Definition at line 23 of file cs_account.cpp.

References CommandScript::CommandScript().

Member Function Documentation

◆ GetCommands()

std::vector< ChatCommand > account_commandscript::GetCommands ( ) const
inlinevirtual

◆ HandleAccountAddonCommand()

◆ HandleAccountBoostAddCommand()

bool account_commandscript::HandleAccountBoostAddCommand ( ChatHandler * handler,
char const * args )
inlinestatic

◆ HandleAccountBoostDelCommand()

bool account_commandscript::HandleAccountBoostDelCommand ( ChatHandler * handler,
char const * args )
inlinestatic

◆ HandleAccountCommand()

◆ HandleAccountCreateCommand()

◆ HandleAccountDeleteCommand()

bool account_commandscript::HandleAccountDeleteCommand ( ChatHandler * handler,
char const * args )
inlinestatic

Delete a user account and all associated characters in this realm

Todo
This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm then delete account)
  • Get the account name from the command line

Commands not recommended call from chat, but support anyway can delete only for account with less security This is also reject self apply in fact

Definition at line 154 of file cs_account.cpp.

References AOR_DB_INTERNAL_ERROR, AOR_NAME_NOT_EXIST, AOR_OK, AccountMgr::DeleteAccount(), AccountMgr::GetId(), ChatHandler::HasLowerSecurityAccount(), LANG_ACCOUNT_DELETED, LANG_ACCOUNT_NOT_DELETED, LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, LANG_ACCOUNT_NOT_EXIST, AccountMgr::normalizeString(), ChatHandler::PSendSysMessage(), and ChatHandler::SetSentErrorMessage().

Referenced by GetCommands().

◆ HandleAccountEmailCommand()

◆ HandleAccountLockCountryCommand()

◆ HandleAccountLockIpCommand()

◆ HandleAccountOnlineListCommand()

bool account_commandscript::HandleAccountOnlineListCommand ( ChatHandler * handler,
char const *  )
inlinestatic

Display info on users currently in the realm.

  • Get the list of accounts ID logged to the realm
  • Display the list of account/characters online
  • Cycle through accounts
  • Get the username, last IP and GM level of each account

Definition at line 210 of file cs_account.cpp.

References CHAR_SEL_CHARACTER_ONLINE, CharacterDatabase, Field::GetCString(), Field::GetString(), Field::GetUInt16(), Field::GetUInt32(), Field::GetUInt8(), LANG_ACCOUNT_LIST_BAR, LANG_ACCOUNT_LIST_BAR_HEADER, LANG_ACCOUNT_LIST_EMPTY, LANG_ACCOUNT_LIST_ERROR, LANG_ACCOUNT_LIST_HEADER, LANG_ACCOUNT_LIST_LINE, LOGIN_SEL_ACCOUNT_INFO, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendSysMessage(), and PreparedStatement::setUInt32().

Referenced by GetCommands().

◆ HandleAccountPasswordCommand()

◆ HandleAccountSetAddonCommand()

bool account_commandscript::HandleAccountSetAddonCommand ( ChatHandler * handler,
char const * args )
inlinestatic

◆ HandleAccountSetEmailCommand()

bool account_commandscript::HandleAccountSetEmailCommand ( ChatHandler * handler,
char const * args )
inlinestatic

◆ HandleAccountSetGmLevelCommand()

◆ HandleAccountSetPasswordCommand()

bool account_commandscript::HandleAccountSetPasswordCommand ( ChatHandler * handler,
char const * args )
inlinestatic

◆ HandleAccountSetRegEmailCommand()

bool account_commandscript::HandleAccountSetRegEmailCommand ( ChatHandler * handler,
char const * args )
inlinestatic

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