mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -17,9 +17,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
|
||||
|
||||
recvPacket >> channelId >> unknown1 >> unknown2 >> channelName >> password;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_JOIN_CHANNEL %s Channel: %u, unk1: %u, unk2: %u, channel: %s, password: %s", GetPlayerInfo().c_str(), channelId, unknown1, unknown2, channelName.c_str(), password.c_str());
|
||||
#endif
|
||||
if (channelId)
|
||||
{
|
||||
ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(channelId);
|
||||
@@ -55,10 +53,8 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> unk >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_LEAVE_CHANNEL %s Channel: %s, unk1: %u",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), unk);
|
||||
#endif
|
||||
if (channelName.empty())
|
||||
return;
|
||||
|
||||
@@ -74,11 +70,9 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "%s %s Channel: %s",
|
||||
recvPacket.GetOpcode() == CMSG_CHANNEL_DISPLAY_LIST ? "CMSG_CHANNEL_DISPLAY_LIST" : "CMSG_CHANNEL_LIST",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
channel->List(GetPlayer());
|
||||
@@ -89,10 +83,8 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
|
||||
std::string channelName, password;
|
||||
recvPacket >> channelName >> password;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_PASSWORD %s Channel: %s, Password: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), password.c_str());
|
||||
#endif
|
||||
if (password.length() > MAX_CHANNEL_PASS_STR)
|
||||
return;
|
||||
|
||||
@@ -106,10 +98,8 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_SET_OWNER %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -123,10 +113,8 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_OWNER %s Channel: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
channel->SendWhoOwner(GetPlayer()->GetGUID());
|
||||
@@ -137,10 +125,8 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MODERATOR %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -154,10 +140,8 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMODERATOR %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -171,10 +155,8 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MUTE %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -188,10 +170,8 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMUTE %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -205,10 +185,8 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_INVITE %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -222,10 +200,8 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_KICK %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -239,10 +215,8 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_BAN %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -256,10 +230,8 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
|
||||
std::string channelName, targetName;
|
||||
recvPacket >> channelName >> targetName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNBAN %s Channel: %s, Target: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
|
||||
#endif
|
||||
if (!normalizePlayerName(targetName))
|
||||
return;
|
||||
|
||||
@@ -273,10 +245,8 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
channel->Announce(GetPlayer());
|
||||
@@ -287,10 +257,8 @@ void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MODERATE %s Channel: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* chn = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
@@ -308,10 +276,8 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket& recvPacket)
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "CMSG_GET_CHANNEL_MEMBER_COUNT %s Channel: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
{
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
|
||||
Reference in New Issue
Block a user