647 std::string targetAccountName;
648 uint32 targetAccountId = 0;
649 uint32 targetSecurity = 0;
651 char* arg1 = strtok((
char*)args,
" ");
652 char* arg2 = strtok(
NULL,
" ");
653 char* arg3 = strtok(
NULL,
" ");
654 bool isAccountNameGiven =
true;
660 isAccountNameGiven =
false;
664 if (!isAccountNameGiven && !arg2)
668 if (isAccountNameGiven)
670 targetAccountName = arg1;
680 gm = (isAccountNameGiven) ? atoi(arg2) : atoi(arg1);
690 int32 gmRealmID = (isAccountNameGiven) ? atoi(arg3) : atoi(arg2);
700 if (targetSecurity >= playerSecurity || gm >= playerSecurity)
734 sAccountMgr->UpdateAccountAccess(rbac, targetAccountId,
uint8(gm), gmRealmID);
void SetSentErrorMessage(bool val)
Definition: Chat.h:138
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
void setUInt8(const uint8 index, const uint8 value)
Definition: PreparedStatement.cpp:97
Definition: Language.h:399
Definition: Language.h:43
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: AccountMgr.h:47
uint32 GetAccountId() const
Definition: WorldSession.h:922
Definition: PreparedStatement.h:74
static uint32 GetSecurity(uint32 accountId)
Definition: AccountMgr.cpp:284
LoginDatabaseWorkerPool LoginDatabase
Accessor to the realm/login database.
Definition: DatabaseEnv.cpp:22
Definition: Language.h:1200
Definition: LoginDatabase.h:90
static uint32 GetId(std::string const &username)
Definition: AccountMgr.cpp:275
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
static bool IsConsoleAccount(uint32 gmlevel)
Definition: AccountMgr.cpp:400
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
#define sAccountMgr
Definition: AccountMgr.h:98
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
Player * getSelectedPlayer()
Definition: Chat.cpp:579
Definition: Language.h:139
uint8_t uint8
Definition: g3dmath.h:164
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
Definition: Language.h:397
WorldSession * GetSession()
Definition: Chat.h:59
Definition: Language.h:412
void PSendSysMessage(const char *fmt, Args &&...args)
Definition: Chat.h:72
bool Utf8ToUpperOnlyLatin(std::string &utf8String)
Definition: Util.cpp:498
virtual void SendSysMessage(char const *str, bool escapeCharacters=false)
Definition: Chat.cpp:152