aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/Logging/Log.cpp4
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp2
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp8
-rw-r--r--src/server/scripts/World/action_ip_logger.cpp10
4 files changed, 12 insertions, 12 deletions
diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp
index c50b0e6c52e..ecc6cbf2b90 100644
--- a/src/common/Logging/Log.cpp
+++ b/src/common/Logging/Log.cpp
@@ -64,7 +64,7 @@ void Log::CreateAppenderFromConfig(std::string const& appenderName)
// Format = type, level, flags, optional1, optional2
// if type = File. optional1 = file and option2 = mode
// if type = Console. optional1 = Color
- std::string options = sConfigMgr->GetStringDefault(appenderName.c_str(), "");
+ std::string options = sConfigMgr->GetStringDefault(appenderName, "");
Tokenizer tokens(options, ',');
auto iter = tokens.begin();
@@ -117,7 +117,7 @@ void Log::CreateLoggerFromConfig(std::string const& appenderName)
LogLevel level = LOG_LEVEL_DISABLED;
uint8 type = uint8(-1);
- std::string options = sConfigMgr->GetStringDefault(appenderName.c_str(), "");
+ std::string options = sConfigMgr->GetStringDefault(appenderName, "");
std::string name = appenderName.substr(7);
if (options.empty())
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 1148823e2b9..cbbb0942341 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -384,7 +384,7 @@ void WorldSession::HandleChatMessage(ChatMsg type, uint32 lang, std::string msg,
if (Channel* chn = ChannelMgr::GetChannelForPlayerByNamePart(target, sender))
{
sScriptMgr->OnPlayerChat(sender, type, lang, msg, chn);
- chn->Say(sender->GetGUID(), msg.c_str(), lang);
+ chn->Say(sender->GetGUID(), msg, lang);
}
break;
}
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index b70687f67bb..24508556447 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -2037,15 +2037,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 182db533ceb..a66e5044916 100644
--- a/src/server/scripts/World/action_ip_logger.cpp
+++ b/src/server/scripts/World/action_ip_logger.cpp
@@ -142,7 +142,7 @@ class AccountActionIpLogger : public AccountScript
stmt->setUInt32(1, 0);
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
@@ -153,7 +153,7 @@ class AccountActionIpLogger : public AccountScript
stmt->setUInt32(1, 0);
stmt->setUInt8(2, aType);
stmt->setUInt32(3, playerGuid);
- stmt->setString(4, systemNote.c_str());
+ stmt->setString(4, systemNote);
LoginDatabase.Execute(stmt);
}
return;
@@ -233,8 +233,8 @@ class CharacterActionIpLogger : public PlayerScript
stmt->setUInt32(0, playerGuid);
stmt->setUInt64(1, player->GetGUID().GetCounter());
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.
@@ -292,7 +292,7 @@ public:
stmt2->setUInt64(1, guid.GetCounter());
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.