mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Core/Opcodes): Implement CMSG_CHANNEL_MODERATE (#4021)
* Core/Opcodes: Implement CMSG_CHANNEL_MODERATE * Cleanup, prettify * fix build * whitespaces
This commit is contained in:
@@ -277,13 +277,28 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
GetPlayerInfo().c_str(), channelName.c_str());
|
||||
#endif
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
|
||||
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
|
||||
channel->Announce(GetPlayer());
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
std::string channelName;
|
||||
recvPacket >> channelName;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "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()))
|
||||
chn->ToggleModeration(GetPlayer());
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelDisplayListQuery(WorldPacket& recvPacket)
|
||||
{
|
||||
// this should be OK because the 2 function _were_ the same
|
||||
|
||||
Reference in New Issue
Block a user