diff options
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/World/action_ip_logger.cpp | 10 | 
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index a830a19bcea..0860585dc65 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1990,15 +1990,15 @@ public:              stmt->setInt64(0, muteTime);          } -        stmt->setString(1, muteReasonStr.c_str()); -        stmt->setString(2, muteBy.c_str()); +        stmt->setString(1, muteReasonStr); +        stmt->setString(2, muteBy);          stmt->setUInt32(3, accountId);          LoginDatabase.Execute(stmt);          stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_MUTE);          stmt->setUInt32(0, accountId);          stmt->setUInt32(1, notSpeakTime); -        stmt->setString(2, muteBy.c_str()); -        stmt->setString(3, muteReasonStr.c_str()); +        stmt->setString(2, muteBy); +        stmt->setString(3, muteReasonStr);          LoginDatabase.Execute(stmt);          std::string nameLink = handler->playerLink(targetName); diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 9dc3fba9896..9e894a52104 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -144,7 +144,7 @@ class AccountActionIpLogger : public AccountScript                  stmt->setUInt32(1, characterGuid);                  stmt->setUInt8(2, aType);                  stmt->setUInt32(3, playerGuid); -                stmt->setString(4, systemNote.c_str()); +                stmt->setString(4, systemNote);                  LoginDatabase.Execute(stmt);              }              else // ... but for failed login, we query last_attempt_ip from account table. Which we do with an unique query @@ -155,7 +155,7 @@ class AccountActionIpLogger : public AccountScript                  stmt->setUInt32(1, characterGuid);                  stmt->setUInt8(2, aType);                  stmt->setUInt32(3, playerGuid); -                stmt->setString(4, systemNote.c_str()); +                stmt->setString(4, systemNote);                  LoginDatabase.Execute(stmt);              }              return; @@ -236,8 +236,8 @@ class CharacterActionIpLogger : public PlayerScript              stmt->setUInt32(0, playerGuid);              stmt->setUInt32(1, characterGuid);              stmt->setUInt8(2, aType); -            stmt->setString(3, currentIp.c_str()); // We query the ip here. -            stmt->setString(4, systemNote.c_str()); +            stmt->setString(3, currentIp); // We query the ip here. +            stmt->setString(4, systemNote);              // Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now;              // Rather, we let it be added with the SQL query. @@ -297,7 +297,7 @@ public:          stmt2->setUInt32(1, characterGuid);          stmt2->setUInt8(2, aType);          stmt2->setUInt32(3, playerGuid); -        stmt2->setString(4, systemNote.c_str()); +        stmt2->setString(4, systemNote);          // Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now;          // Rather, we let it be added with the SQL query.  | 
