aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKittnz <Kittnz@users.noreply.github.com>2016-08-05 11:15:55 +0200
committerGitHub <noreply@github.com>2016-08-05 11:15:55 +0200
commit2c0c129a8f7dc8147c393438b06f7d76d0efdfe3 (patch)
tree91d95bf2c4ddb128fa331dddfa0b9ed0c816d678 /src
parent6bb6bc7f1d362a61314cfd763de67954ca1462b3 (diff)
parent6a87524204161234576810f770d8ad2a0b9bb9c8 (diff)
Merge pull request #17733 from ForesterDev/acc_del
Core/Command: remove account_muted data on account deletion
Diffstat (limited to 'src')
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.cpp1
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.h1
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp4
3 files changed, 6 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp
index 4f056e2686d..c868d2a4b5c 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/database/Database/Implementation/LoginDatabase.cpp
@@ -117,4 +117,5 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_DEL_RBAC_ACCOUNT_PERMISSION, "DELETE FROM rbac_account_permissions WHERE accountId = ? AND permissionId = ? AND (realmId = ? OR realmId = -1)", CONNECTION_ASYNC);
PrepareStatement(LOGIN_INS_ACCOUNT_MUTE, "INSERT INTO account_muted VALUES (?, UNIX_TIMESTAMP(), ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(LOGIN_SEL_ACCOUNT_MUTE_INFO, "SELECT mutedate, mutetime, mutereason, mutedby FROM account_muted WHERE guid = ? ORDER BY mutedate ASC", CONNECTION_SYNCH);
+ PrepareStatement(LOGIN_DEL_ACCOUNT_MUTED, "DELETE FROM account_muted WHERE guid = ?", CONNECTION_ASYNC);
}
diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h
index e206be16d73..2bed9664d34 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.h
+++ b/src/server/database/Database/Implementation/LoginDatabase.h
@@ -113,6 +113,7 @@ enum LoginDatabaseStatements
LOGIN_INS_ACCOUNT_MUTE,
LOGIN_SEL_ACCOUNT_MUTE_INFO,
+ LOGIN_DEL_ACCOUNT_MUTED,
MAX_LOGINDATABASE_STATEMENTS
};
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index fa3e8818fe0..6269b968852 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -132,6 +132,10 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accountId)
stmt->setUInt32(0, accountId);
trans->Append(stmt);
+ stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_MUTED);
+ stmt->setUInt32(0, accountId);
+ trans->Append(stmt);
+
LoginDatabase.CommitTransaction(trans);
return AccountOpResult::AOR_OK;