AzerothCore 3.3.5a
OpenSource WoW Emulator
|
Public Member Functions | |
account_commandscript () | |
ChatCommandTable | GetCommands () const override |
virtual std::vector< Acore::ChatCommands::ChatCommandBuilder > | GetCommands () const =0 |
Public Member Functions inherited from ScriptObject | |
virtual bool | IsDatabaseBound () const |
virtual bool | isAfterLoadScript () const |
virtual void | checkValidity () |
const std::string & | GetName () const |
uint16 | GetTotalAvailableHooks () |
Static Public Member Functions | |
static bool | HandleAccount2FASetupCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccount2FARemoveCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountAddonCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountCreateCommand (ChatHandler *handler, char const *args) |
Create an account. More... | |
static bool | HandleAccountDeleteCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountOnlineListCommand (ChatHandler *handler, char const *) |
Display info on users currently in the realm. More... | |
static bool | HandleAccountRemoveLockCountryCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountLockCountryCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountLockIpCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountPasswordCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountSet2FACommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountCommand (ChatHandler *handler, char const *) |
static bool | HandleAccountSetAddonCommand (ChatHandler *handler, char const *args) |
Set/Unset the expansion level for an account. More... | |
static bool | HandleAccountSetGmLevelCommand (ChatHandler *handler, char const *args) |
static bool | HandleAccountSetPasswordCommand (ChatHandler *handler, char const *args) |
Set password for account. More... | |
static bool | HandleAccountSetEmailCommand (ChatHandler *handler, AccountIdentifier account, std::string email, std::string emailConfirmation) |
Set email for account. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CommandScript | |
CommandScript (const char *name) | |
Protected Member Functions inherited from ScriptObject | |
ScriptObject (const char *name, uint16 totalAvailableHooks=0) | |
virtual | ~ScriptObject ()=default |
|
inline |
|
inlineoverridevirtual |
Implements CommandScript.
References HandleAccount2FARemoveCommand(), HandleAccount2FASetupCommand(), HandleAccountAddonCommand(), HandleAccountCommand(), HandleAccountCreateCommand(), HandleAccountDeleteCommand(), HandleAccountLockCountryCommand(), HandleAccountLockIpCommand(), HandleAccountOnlineListCommand(), HandleAccountPasswordCommand(), HandleAccountRemoveLockCountryCommand(), HandleAccountSet2FACommand(), HandleAccountSetAddonCommand(), HandleAccountSetEmailCommand(), HandleAccountSetGmLevelCommand(), HandleAccountSetPasswordCommand(), SEC_ADMINISTRATOR, SEC_CONSOLE, SEC_GAMEMASTER, SEC_MODERATOR, and SEC_PLAYER.
|
inlinestatic |
References Field::Get(), WorldSession::GetAccountId(), ChatHandler::GetSession(), Field::IsNull(), LANG_2FA_COMMANDS_NOT_SETUP, LANG_2FA_INVALID_TOKEN, LANG_2FA_NOT_SETUP, LANG_2FA_REMOVE_COMPLETE, LANG_2FA_REMOVE_NEED_TOKEN, LANG_CMD_SYNTAX, LANG_UNKNOWN_ERROR, LOG_ERROR, LOGIN_SEL_ACCOUNT_TOTP_SECRET, LOGIN_UPD_ACCOUNT_TOTP_SECRET, LoginDatabase, SECRET_TOTP_MASTER_KEY, ChatHandler::SendErrorMessage(), ChatHandler::SendSysMessage(), sSecretMgr, and Acore::Crypto::TOTP::ValidateToken().
Referenced by GetCommands().
|
inlinestatic |
References Acore::Encoding::Base32::Encode(), WorldSession::GetAccountId(), Acore::Crypto::GetRandomBytes(), ChatHandler::GetSession(), LANG_2FA_ALREADY_SETUP, LANG_2FA_COMMANDS_NOT_SETUP, LANG_2FA_INVALID_TOKEN, LANG_2FA_SECRET_SUGGESTION, LANG_2FA_SETUP_COMPLETE, LANG_CMD_SYNTAX, LANG_UNKNOWN_ERROR, LOG_ERROR, LOGIN_SEL_ACCOUNT_TOTP_SECRET, LOGIN_UPD_ACCOUNT_TOTP_SECRET, LoginDatabase, Acore::Crypto::TOTP::RECOMMENDED_SECRET_LENGTH, SECRET_TOTP_MASTER_KEY, ChatHandler::SendErrorMessage(), ChatHandler::SendSysMessage(), sSecretMgr, and Acore::Crypto::TOTP::ValidateToken().
Referenced by GetCommands().
|
inlinestatic |
References CONFIG_EXPANSION, WorldSession::GetAccountId(), ChatHandler::GetSession(), LANG_ACCOUNT_ADDON, LANG_CMD_SYNTAX, LANG_IMPROPER_VALUE, LOGIN_UPD_EXPANSION, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), PreparedStatementBase::SetData(), and sWorld.
Referenced by GetCommands().
|
inlinestatic |
References WorldSession::GetSecurity(), ChatHandler::GetSession(), LANG_ACCOUNT_LEVEL, and ChatHandler::PSendSysMessage().
Referenced by GetCommands().
|
inlinestatic |
Create an account.
References AOR_DB_INTERNAL_ERROR, AOR_NAME_ALREADY_EXIST, AOR_NAME_TOO_LONG, AOR_OK, AOR_PASS_TOO_LONG, AccountMgr::CreateAccount(), WorldSession::GetAccountId(), Object::GetGUID(), WorldObject::GetName(), WorldSession::GetPlayer(), WorldSession::GetRemoteAddress(), ChatHandler::GetSession(), LANG_ACCOUNT_ALREADY_EXIST, LANG_ACCOUNT_CREATED, LANG_ACCOUNT_NOT_CREATED, LANG_ACCOUNT_NOT_CREATED_SQL_ERROR, LANG_ACCOUNT_PASS_TOO_LONG, LANG_ACCOUNT_TOO_LONG, LOG_DEBUG, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), and ObjectGuid::ToString().
Referenced by GetCommands().
|
inlinestatic |
Delete a user account and all associated characters in this realm
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
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, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
References WorldSession::GetAccountId(), WorldSession::GetRemoteAddress(), ChatHandler::GetSession(), LANG_COMMAND_ACCLOCKLOCKED, LANG_COMMAND_ACCLOCKUNLOCKED, LANG_USE_BOL, LOGIN_UPD_ACCOUNT_LOCK_COUNTRY, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), and sIPLocation.
Referenced by GetCommands().
|
inlinestatic |
References WorldSession::GetAccountId(), ChatHandler::GetSession(), LANG_COMMAND_ACCLOCKLOCKED, LANG_COMMAND_ACCLOCKUNLOCKED, LANG_USE_BOL, LOGIN_UPD_ACCOUNT_LOCK, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), and PreparedStatementBase::SetData().
Referenced by GetCommands().
|
inlinestatic |
Display info on users currently in the realm.
References CHAR_SEL_CHARACTER_ONLINE, CharacterDatabase, Field::Get(), 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(), and ChatHandler::SendSysMessage().
Referenced by GetCommands().
|
inlinestatic |
References AOR_OK, AOR_PASS_TOO_LONG, AccountMgr::ChangePassword(), AccountMgr::CheckPassword(), WorldSession::GetAccountId(), ChatHandler::GetSession(), LANG_CMD_SYNTAX, LANG_COMMAND_NOTCHANGEPASSWORD, LANG_COMMAND_PASSWORD, LANG_COMMAND_WRONGOLDPASSWORD, LANG_NEW_PASSWORDS_NOT_MATCH, LANG_PASSWORD_TOO_LONG, ChatHandler::SendErrorMessage(), ChatHandler::SendSysMessage(), and sScriptMgr.
Referenced by GetCommands().
|
inlinestatic |
References AccountMgr::GetId(), LANG_ACCOUNT_NOT_EXIST, LANG_CMD_SYNTAX, LANG_COMMAND_ACCLOCKUNLOCKED, LOGIN_UPD_ACCOUNT_LOCK_COUNTRY, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
References Acore::Encoding::Base32::Decode(), AccountMgr::GetId(), ChatHandler::HasLowerSecurityAccount(), Acore::Crypto::AES::IV_SIZE_BYTES, LANG_2FA_COMMANDS_NOT_SETUP, LANG_2FA_REMOVE_COMPLETE, LANG_2FA_SECRET_INVALID, LANG_2FA_SECRET_SET_COMPLETE, LANG_2FA_SECRET_TOO_LONG, LANG_ACCOUNT_NOT_EXIST, LANG_CMD_SYNTAX, LOGIN_UPD_ACCOUNT_TOTP_SECRET, LoginDatabase, ChatHandler::PSendSysMessage(), SECRET_TOTP_MASTER_KEY, ChatHandler::SendErrorMessage(), sSecretMgr, Acore::Crypto::AES::TAG_SIZE_BYTES, and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
Set/Unset the expansion level for an account.
References CONFIG_EXPANSION, WorldSession::GetAccountId(), AccountMgr::GetId(), AccountMgr::GetName(), ChatHandler::getSelectedPlayer(), ChatHandler::GetSession(), Player::GetSession(), ChatHandler::HasLowerSecurityAccount(), LANG_ACCOUNT_NOT_EXIST, LANG_ACCOUNT_SETADDON, LOGIN_UPD_EXPANSION, LoginDatabase, ChatHandler::PSendSysMessage(), ChatHandler::SendErrorMessage(), PreparedStatementBase::SetData(), sWorld, and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
Set email for account.
References AOR_EMAIL_TOO_LONG, AOR_NAME_NOT_EXIST, AOR_OK, AccountMgr::ChangeEmail(), Acore::ChatCommands::AccountIdentifier::GetID(), Acore::ChatCommands::AccountIdentifier::GetName(), LANG_ACCOUNT_NOT_EXIST, LANG_COMMAND_EMAIL, LANG_COMMAND_NOTCHANGEEMAIL, LANG_EMAIL_TOO_LONG, LANG_NEW_EMAILS_NOT_MATCH, ChatHandler::SendErrorMessage(), ChatHandler::SendSysMessage(), and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
References WorldSession::GetAccountId(), AccountMgr::GetId(), AccountMgr::GetSecurity(), ChatHandler::getSelectedPlayer(), ChatHandler::GetSession(), Player::GetSession(), Realm::Id, AccountMgr::IsConsoleAccount(), LANG_ACCOUNT_NOT_EXIST, LANG_BAD_VALUE, LANG_INVALID_REALMID, LANG_YOU_CHANGE_SECURITY, LANG_YOURS_SECURITY_IS_LOW, LOGIN_DEL_ACCOUNT_ACCESS, LOGIN_DEL_ACCOUNT_ACCESS_BY_REALM, LOGIN_INS_ACCOUNT_ACCESS, LOGIN_SEL_ACCOUNT_ACCESS_GMLEVEL_TEST, LoginDatabase, ChatHandler::PSendSysMessage(), realm, RealmHandle::Realm, SEC_CONSOLE, ChatHandler::SendErrorMessage(), PreparedStatementBase::SetData(), and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().
|
inlinestatic |
Set password for account.
can set password only for target with less security This is also reject self apply in fact
References AOR_NAME_NOT_EXIST, AOR_OK, AOR_PASS_TOO_LONG, AccountMgr::ChangePassword(), AccountMgr::GetId(), ChatHandler::HasLowerSecurityAccount(), LANG_ACCOUNT_NOT_EXIST, LANG_COMMAND_NOTCHANGEPASSWORD, LANG_COMMAND_PASSWORD, LANG_NEW_PASSWORDS_NOT_MATCH, LANG_PASSWORD_TOO_LONG, ChatHandler::SendErrorMessage(), ChatHandler::SendSysMessage(), and Utf8ToUpperOnlyLatin().
Referenced by GetCommands().