diff options
| author | Shauren <shauren.trinity@gmail.com> | 2019-07-27 01:00:37 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2019-07-27 01:00:37 +0200 |
| commit | e8e89f58fb800014f53341f12505f60ee2b5fb6f (patch) | |
| tree | 2b63800163e2026be75621a36ddf1218bdbf9dab /src/server/scripts/World | |
| parent | 1dcbceba81002ba6ff83129d403763df398f9736 (diff) | |
Core/DBLayer: Prevent using prepared statements on wrong database
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/action_ip_logger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index cf48b45c400..b58938480e9 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -136,7 +136,7 @@ class AccountActionIpLogger : public AccountScript { // As we can assume most account actions are NOT failed login, so this is the more accurate check. // For those, we need last_ip... - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt32(1, 0); @@ -147,7 +147,7 @@ class AccountActionIpLogger : public AccountScript } else // ... but for failed login, we query last_attempt_ip from account table. Which we do with an unique query { - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FACL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FACL_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt32(1, 0); @@ -228,7 +228,7 @@ class CharacterActionIpLogger : public PlayerScript } // Once we have done everything, we can insert the new log. - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_CHAR_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_CHAR_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt64(1, player->GetGUID().GetCounter()); @@ -286,7 +286,7 @@ public: } // Once we have done everything, we can insert the new log. - PreparedStatement* stmt2 = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt2 = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); stmt2->setUInt32(0, playerGuid); stmt2->setUInt64(1, guid.GetCounter()); |
