TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ChannelHandler.cpp File Reference
#include "ObjectMgr.h"
#include "ChannelMgr.h"
#include "ChannelPackets.h"
#include "Player.h"
#include "WorldSession.h"
#include <cctype>
+ Include dependency graph for ChannelHandler.cpp:

Functions

template<>
void WorldSession::HandleChannelPlayerCommand<&Channel::Password > (WorldPackets::Channel::ChannelPlayerCommand &packet)
 
template void WorldSession::HandleChannelCommand<&Channel::Announce > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::Ban > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelCommand<&Channel::DeclineInvite > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::Invite > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::Kick > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelCommand<&Channel::List > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::SetModerator > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::SetMute > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelCommand<&Channel::SendWhoOwner > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::SetOwner > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::SilenceAll > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::SilenceVoice > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::UnBan > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::UnsetModerator > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::UnsetMute > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::UnsilenceAll > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelPlayerCommand<&Channel::UnsilenceVoice > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelCommand<&Channel::DeVoice > (WorldPackets::Channel::ChannelPlayerCommand &)
 
template void WorldSession::HandleChannelCommand<&Channel::Voice > (WorldPackets::Channel::ChannelPlayerCommand &)
 

Function Documentation

107 {
108  if (packet.Name.length() > MAX_CHANNEL_PASS_STR)
109  {
110  TC_LOG_DEBUG("chat.system", "%s %s ChannelName: %s, Password: %s, Password too long.",
111  GetOpcodeNameForLogging(packet.GetOpcode()).c_str(), GetPlayerInfo().c_str(), packet.ChannelName.c_str(), packet.Name.c_str());
112  return;
113  }
114 
115  TC_LOG_DEBUG("chat.system", "%s %s ChannelName: %s, Password: %s",
116  GetOpcodeNameForLogging(packet.GetOpcode()).c_str(), GetPlayerInfo().c_str(), packet.ChannelName.c_str(), packet.Name.c_str());
117 
118  if (ChannelMgr* cMgr = ChannelMgr::ForTeam(GetPlayer()->GetTeam()))
119  if (Channel* channel = cMgr->GetChannel(packet.ChannelName, GetPlayer()))
120  channel->Password(GetPlayer(), packet.Name);
121 }
static ChannelMgr * ForTeam(uint32 team)
Definition: ChannelMgr.cpp:30
void GetPlayerInfo(ChatHandler *handler, Player *player)
Definition: cs_lfg.cpp:27
std::string GetOpcodeNameForLogging(T id)
Lookup opcode name for human understandable logging (T = OpcodeClient|OpcodeServer) ...
Definition: Opcodes.h:1777
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Channel.h:126
std::string Name
Definition: ChannelPackets.h:177
std::string ChannelName
Definition: ChannelPackets.h:176
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:184
OpcodeClient GetOpcode() const
Definition: Packet.h:72
#define MAX_CHANNEL_PASS_STR
Definition: ChannelMgr.h:25
Definition: ChannelMgr.h:27

+ Here is the call graph for this function: