mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Commands: Added new 'bnetaccount listgameaccounts' command to display all account table entries linked to a given battle.net email
* Also fixed errors about bad commands in db Closes #18474
This commit is contained in:
@@ -138,6 +138,7 @@ void LoginDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(LOGIN_SEL_BNET_ACCOUNT_ID_BY_GAME_ACCOUNT, "SELECT battlenet_account FROM account WHERE id = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(LOGIN_UPD_BNET_GAME_ACCOUNT_LINK, "UPDATE account SET battlenet_account = ?, battlenet_index = ? WHERE id = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(LOGIN_SEL_BNET_MAX_ACCOUNT_INDEX, "SELECT MAX(battlenet_index) FROM account WHERE battlenet_account = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(LOGIN_SEL_BNET_GAME_ACCOUNT_LIST, "SELECT a.id, a.username FROM account a LEFT JOIN battlenet_accounts ba ON a.battlenet_account = ba.id WHERE ba.email = ?", CONNECTION_SYNCH);
|
||||
|
||||
PrepareStatement(LOGIN_UPD_BNET_FAILED_LOGINS, "UPDATE battlenet_accounts SET failed_logins = failed_logins + 1 WHERE id = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(LOGIN_INS_BNET_ACCOUNT_AUTO_BANNED, "INSERT INTO battlenet_account_bans(id, bandate, unbandate, bannedby, banreason) VALUES(?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity Auth', 'Failed login autoban')", CONNECTION_ASYNC);
|
||||
|
||||
@@ -129,6 +129,7 @@ enum LoginDatabaseStatements
|
||||
LOGIN_SEL_BNET_ACCOUNT_ID_BY_GAME_ACCOUNT,
|
||||
LOGIN_UPD_BNET_GAME_ACCOUNT_LINK,
|
||||
LOGIN_SEL_BNET_MAX_ACCOUNT_INDEX,
|
||||
LOGIN_SEL_BNET_GAME_ACCOUNT_LIST,
|
||||
|
||||
LOGIN_UPD_BNET_FAILED_LOGINS,
|
||||
LOGIN_INS_BNET_ACCOUNT_AUTO_BANNED,
|
||||
|
||||
Reference in New Issue
Block a user