aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Channels
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
committerShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
commitd791afae1dfcfaf592326f787755ca32d629e4d3 (patch)
tree54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/game/Chat/Channels
parentb6820a706f46f18b9652fcd9806e4bec8805d29d (diff)
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/game/Chat/Channels')
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp10
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 46a4df0df76..3398503d270 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -83,7 +83,7 @@ Channel::Channel(ObjectGuid const& guid, std::string const& name, uint32 team /*
if (!banned)
continue;
- TC_LOG_DEBUG("chat.system", "Channel(%s) loaded player %s into bannedStore", name.c_str(), banned.ToString().c_str());
+ TC_LOG_DEBUG("chat.system", "Channel({}) loaded player {} into bannedStore", name, banned.ToString());
_bannedStore.insert(banned);
}
}
@@ -96,9 +96,9 @@ void Channel::GetChannelName(std::string& channelName, uint32 channelId, LocaleC
if (!(channelEntry->Flags & CHANNEL_DBC_FLAG_GLOBAL))
{
if (channelEntry->Flags & CHANNEL_DBC_FLAG_CITY_ONLY)
- channelName = Trinity::StringFormat(channelEntry->Name[locale], sObjectMgr->GetTrinityString(LANG_CHANNEL_CITY, locale));
+ channelName = fmt::sprintf(channelEntry->Name[locale], sObjectMgr->GetTrinityString(LANG_CHANNEL_CITY, locale));
else
- channelName = Trinity::StringFormat(channelEntry->Name[locale], ASSERT_NOTNULL(zoneEntry)->AreaName[locale]);
+ channelName = fmt::sprintf(channelEntry->Name[locale], ASSERT_NOTNULL(zoneEntry)->AreaName[locale]);
}
else
channelName = channelEntry->Name[locale];
@@ -601,8 +601,8 @@ void Channel::List(Player const* player)
}
std::string channelName = GetName(player->GetSession()->GetSessionDbcLocale());
- TC_LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST %s Channel: %s",
- player->GetSession()->GetPlayerInfo().c_str(), channelName.c_str());
+ TC_LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST {} Channel: {}",
+ player->GetSession()->GetPlayerInfo(), channelName);
WorldPackets::Channel::ChannelListResponse list;
list._Display = true; /// always true?
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index 94f5c95457c..d67572d18bf 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -72,7 +72,7 @@ ChannelMgr::~ChannelMgr()
std::wstring channelName;
if (!Utf8toWStr(dbName, channelName))
{
- TC_LOG_ERROR("server.loading", "Failed to load custom chat channel '%s' from database - invalid utf8 sequence? Deleted.", dbName.c_str());
+ TC_LOG_ERROR("server.loading", "Failed to load custom chat channel '{}' from database - invalid utf8 sequence? Deleted.", dbName);
toDelete.push_back({ dbName, team });
continue;
}
@@ -80,7 +80,7 @@ ChannelMgr::~ChannelMgr()
ChannelMgr* mgr = ForTeam(team);
if (!mgr)
{
- TC_LOG_ERROR("server.loading", "Failed to load custom chat channel '%s' from database - invalid team %u. Deleted.", dbName.c_str(), team);
+ TC_LOG_ERROR("server.loading", "Failed to load custom chat channel '{}' from database - invalid team {}. Deleted.", dbName, team);
toDelete.push_back({ dbName, team });
continue;
}
@@ -102,7 +102,7 @@ ChannelMgr::~ChannelMgr()
CharacterDatabase.Execute(stmt);
}
- TC_LOG_INFO("server.loading", ">> Loaded %u custom chat channels in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded {} custom chat channels in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
}
/*static*/ ChannelMgr* ChannelMgr::ForTeam(uint32 team)