OregonCore  revision 3611e8a-git
Your Favourite TBC server
ChatHandler.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include "Common.h"
19 #include "ObjectAccessor.h"
20 #include "ObjectMgr.h"
21 #include "World.h"
22 #include "WorldPacket.h"
23 #include "WorldSession.h"
24 #include "Database/DatabaseEnv.h"
25 #include "Chat.h"
26 #include "ChannelMgr.h"
27 #include "Group.h"
28 #include "Guild.h"
29 #include "Language.h"
30 #include "Log.h"
31 #include "Opcodes.h"
32 #include "MapManager.h"
33 #include "Player.h"
34 #include "SpellAuras.h"
35 #include "CreatureAI.h"
36 #include "Util.h"
37 
39 {
40  if (lang != LANG_ADDON)
41  {
42  // strip invisible characters for non-addon messages
45 
47  && !ChatHandler(this).isValidChatMessage(msg.c_str()))
48  {
49  sLog.outError("Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(),
50  GetPlayer()->GetGUIDLow(), msg.c_str());
52  KickPlayer();
53  return false;
54  }
55  }
56 
57  return true;
58 }
59 
61 {
62  uint32 type;
63  uint32 lang;
64 
65  recv_data >> type;
66  recv_data >> lang;
67 
68  if (type >= MAX_CHAT_MSG_TYPE)
69  {
70  sLog.outError("CHAT: Wrong message type received: %u", type);
71  return;
72  }
73 
74  //sLog.outDebug("CHAT: packet received. type %u, lang %u", type, lang);
75 
76  // prevent talking at unknown language (cheating)
77  LanguageDesc const* langDesc = GetLanguageDescByID(lang);
78  if (!langDesc)
79  {
81  return;
82  }
83  if (langDesc->skill_id != 0 && !_player->HasSkill(langDesc->skill_id))
84  {
85  // also check SPELL_AURA_COMPREHEND_LANGUAGE (client offers option to speak in that language)
87  bool foundAura = false;
88  for (Unit::AuraList::const_iterator i = langAuras.begin(); i != langAuras.end(); ++i)
89  {
90  if ((*i)->GetModifier()->m_miscvalue == int32(lang))
91  {
92  foundAura = true;
93  break;
94  }
95  }
96  if (!foundAura)
97  {
99  return;
100  }
101  }
102 
103  if (lang == LANG_ADDON)
104  {
105  if (sWorld.getConfig(CONFIG_CHATLOG_ADDON))
106  {
107  std::string msg = "";
108  recv_data >> msg;
109 
110  if (msg.empty())
111  {
112  sLog.outDebug("Player %s send empty addon msg", GetPlayer()->GetName());
113  return;
114  }
115 
116  sLog.outChat("[ADDON] Player %s sends: %s",
117  GetPlayer()->GetName(), msg.c_str());
118  }
119 
120  // check if addon messages are disabled
121  if (!sWorld.getConfig(CONFIG_ADDON_CHANNEL))
122  {
123  recv_data.rpos();
124  return;
125  }
126  }
127  // LANG_ADDON should not be changed nor be affected by flood control
128  else
129  {
130  // send in universal language if player in .gmon mode (ignore spell effects)
131  if (_player->IsGameMaster())
132  lang = LANG_UNIVERSAL;
133  else
134  {
135  // send in universal language in two side iteration allowed mode
137  lang = LANG_UNIVERSAL;
138  else
139  {
140  switch (type)
141  {
142  case CHAT_MSG_PARTY:
143  case CHAT_MSG_RAID:
146  // allow two side chat at group channel if two side group allowed
148  lang = LANG_UNIVERSAL;
149  break;
150  case CHAT_MSG_GUILD:
151  case CHAT_MSG_OFFICER:
152  // allow two side chat at guild channel if two side guild allowed
154  lang = LANG_UNIVERSAL;
155  break;
156  }
157  }
158 
159  // but overwrite it by SPELL_AURA_MOD_LANGUAGE auras (only single case used)
161  if (!ModLangAuras.empty())
162  lang = ModLangAuras.front()->GetModifier()->m_miscvalue;
163  }
164 
165  if (!_player->CanSpeak())
166  {
167  std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
169  return;
170  }
171 
172  if (type != CHAT_MSG_AFK && type != CHAT_MSG_DND)
174  }
175 
176  if (GetPlayer()->HasAura(1852, 0) && type != CHAT_MSG_WHISPER)
177  {
178  std::string msg = "";
179  recv_data >> msg;
180  if (ChatHandler(this).ParseCommands(msg.c_str()) == 0)
181  {
183  return;
184  }
185  }
186 
187  std::string to, channel, msg;
188  bool ignoreChecks = false;
189  switch (type)
190  {
191  case CHAT_MSG_SAY:
192  case CHAT_MSG_EMOTE:
193  case CHAT_MSG_YELL:
194  case CHAT_MSG_PARTY:
195  case CHAT_MSG_GUILD:
196  case CHAT_MSG_OFFICER:
197  case CHAT_MSG_RAID:
202  recv_data >> msg;
203  break;
204  case CHAT_MSG_WHISPER:
205  recv_data >> to;
206  recv_data >> msg;
207  break;
208  case CHAT_MSG_CHANNEL:
209  recv_data >> channel;
210  recv_data >> msg;
211  break;
212  case CHAT_MSG_AFK:
213  case CHAT_MSG_DND:
214  recv_data >> msg;
215  ignoreChecks = true;
216  break;
217  }
218 
219  if (!ignoreChecks)
220  {
221  if (msg.empty())
222  return;
223 
224  if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
225  return;
226 
228  return;
229 
230  if (msg.empty())
231  return;
232  }
233 
234  switch (type)
235  {
236  case CHAT_MSG_SAY:
237  case CHAT_MSG_EMOTE:
238  case CHAT_MSG_YELL:
239  {
240  if (type == CHAT_MSG_SAY)
241  GetPlayer()->Say(msg, lang);
242  else if (type == CHAT_MSG_EMOTE)
243  GetPlayer()->TextEmote(msg);
244  else if (type == CHAT_MSG_YELL)
245  GetPlayer()->Yell(msg, lang);
246  }
247  break;
248 
249  case CHAT_MSG_WHISPER:
250  {
251  if (!normalizePlayerName(to))
252  {
254  break;
255  }
256 
257  Player* player = sObjectMgr.GetPlayer(to.c_str(), true);
258  uint32 tSecurity = GetSecurity();
259  uint32 pSecurity = player ? player->GetSession()->GetSecurity() : uint32(SEC_PLAYER);
260  if (!player || (lang != LANG_ADDON && tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
261  {
263  return;
264  }
265 
266  if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER)
267  {
268  uint32 sidea = GetPlayer()->GetTeam();
269  uint32 sideb = player->GetTeam();
270  if (sidea != sideb)
271  {
273  return;
274  }
275  }
276 
277  if (GetPlayer()->HasAura(1852, 0) && !player->IsGameMaster())
278  {
280  return;
281  }
282 
283  GetPlayer()->Whisper(msg, lang, player);
284  }
285  break;
286 
287  case CHAT_MSG_PARTY:
288  {
289  // if player is in battleground, he cannot say to battleground members by /p
290  Group* group = GetPlayer()->GetOriginalGroup();
291  if (!group)
292  {
293  group = GetPlayer()->GetGroup();
294  if (!group || group->isBGGroup())
295  return;
296  }
297 
298  WorldPacket data;
299  ChatHandler::FillMessageData(&data, this, type, lang, NULL, 0, msg.c_str(), NULL);
300  group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetGUID()));
301 
302  if (sWorld.getConfig(CONFIG_CHATLOG_PARTY))
303  sLog.outChat("[PARTY] Player %s tells group with leader %s: %s",
304  GetPlayer()->GetName(), group->GetLeaderName(), msg.c_str());
305  }
306  break;
307  case CHAT_MSG_GUILD:
308  {
309  if (GetPlayer()->GetGuildId())
310  {
311  Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
312  if (guild)
313  guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
314 
315  if (lang != LANG_ADDON && sWorld.getConfig(CONFIG_CHATLOG_GUILD))
316  {
317  sLog.outChat("[GUILD] Player %s tells guild %s: %s",
318  GetPlayer()->GetName(), guild->GetName().c_str(), msg.c_str());
319  }
320  else if (lang == LANG_ADDON && sWorld.getConfig(CONFIG_CHATLOG_ADDON))
321  {
322  sLog.outChat("[ADDON] Player %s sends to guild %s: %s",
323  GetPlayer()->GetName(), guild->GetName().c_str(), msg.c_str());
324  }
325  }
326  }
327  break;
328  case CHAT_MSG_OFFICER:
329  {
330  if (GetPlayer()->GetGuildId())
331  {
332  Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
333  if (guild)
334  guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
335 
336  if (sWorld.getConfig(CONFIG_CHATLOG_GUILD))
337  sLog.outChat("[OFFICER] Player %s tells guild %s officers: %s",
338  GetPlayer()->GetName(), guild->GetName().c_str(), msg.c_str());
339  }
340  }
341  break;
342  case CHAT_MSG_RAID:
343  {
344  // if player is in battleground, he cannot say to battleground members by /ra
345  Group* group = GetPlayer()->GetOriginalGroup();
346  // so if player hasn't OriginalGroup and his player->GetGroup() is BG raid or his group isn't raid, then return
347  if ((!group && !(group = GetPlayer()->GetGroup())) || group->isBGGroup() || !group->isRaidGroup())
348  return;
349 
350  WorldPacket data;
351  ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID, lang, "", 0, msg.c_str(), NULL);
352  group->BroadcastPacket(&data, false);
353 
354  if (sWorld.getConfig(CONFIG_CHATLOG_RAID))
355  sLog.outChat("[RAID] Player %s tells raid with leader %s: %s",
356  GetPlayer()->GetName(), group->GetLeaderName(), msg.c_str());
357  }
358  break;
360  {
361  // if player is in battleground, he cannot say to battleground members by /ra
362  Group* group = GetPlayer()->GetOriginalGroup();
363  if ((!group && !(group = GetPlayer()->GetGroup())) || group->isBGGroup() || !group->isRaidGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
364  return;
365 
366  WorldPacket data;
367  ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID_LEADER, lang, "", 0, msg.c_str(), NULL);
368  group->BroadcastPacket(&data, false);
369 
370  if (sWorld.getConfig(CONFIG_CHATLOG_RAID))
371  sLog.outChat("[RAID] Leader player %s tells raid: %s",
372  GetPlayer()->GetName(), msg.c_str());
373  }
374  break;
376  {
377  Group* group = GetPlayer()->GetGroup();
378  if (!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())) || group->isBGGroup())
379  return;
380 
381  WorldPacket data;
382  // in battleground, raid warning is sent only to players in battleground - code is ok
383  ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID_WARNING, lang, "", 0, msg.c_str(), NULL);
384  group->BroadcastPacket(&data, false);
385 
386  if (sWorld.getConfig(CONFIG_CHATLOG_RAID))
387  sLog.outChat("[RAID] Leader player %s warns raid with: %s",
388  GetPlayer()->GetName(), msg.c_str());
389  }
390  break;
391 
393  {
394  //battleground raid is always in Player->GetGroup(), never in GetOriginalGroup()
395  Group* group = GetPlayer()->GetGroup();
396  if (!group || !group->isBGGroup())
397  return;
398 
399  WorldPacket data;
400  ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND, lang, "", 0, msg.c_str(), NULL);
401  group->BroadcastPacket(&data, false);
402 
403  if (sWorld.getConfig(CONFIG_CHATLOG_BGROUND))
404  sLog.outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
405  GetPlayer()->GetName(), group->GetLeaderName(), msg.c_str());
406  }
407  break;
408 
410  {
411  //battleground raid is always in Player->GetGroup(), never in GetOriginalGroup()
412  Group* group = GetPlayer()->GetGroup();
413  if (!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
414  return;
415 
416  WorldPacket data;
417  ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND_LEADER, lang, "", 0, msg.c_str(), NULL);
418  group->BroadcastPacket(&data, false);
419 
420  if (sWorld.getConfig(CONFIG_CHATLOG_BGROUND))
421  sLog.outChat("[RAID] Leader player %s tells battleground: %s",
422  GetPlayer()->GetName(), msg.c_str());
423  }
424  break;
425 
426  case CHAT_MSG_CHANNEL:
427  {
428  if (ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
429  {
430  if (Channel* chn = cMgr->GetChannel(channel, _player))
431  {
432  chn->Say(_player->GetGUID(), msg.c_str(), lang);
433 
434  if ((chn->HasFlag(CHANNEL_FLAG_TRADE) ||
435  chn->HasFlag(CHANNEL_FLAG_GENERAL) ||
436  chn->HasFlag(CHANNEL_FLAG_CITY) ||
437  chn->HasFlag(CHANNEL_FLAG_LFG)) &&
438  sWorld.getConfig(CONFIG_CHATLOG_SYSCHAN))
439  sLog.outChat("[SYSCHAN] Player %s tells channel %s: %s",
440  GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
441  else if (sWorld.getConfig(CONFIG_CHATLOG_CHANNEL))
442  sLog.outChat("[CHANNEL] Player %s tells channel %s: %s",
443  GetPlayer()->GetName(), chn->GetName().c_str(), msg.c_str());
444  }
445  }
446  }
447  break;
448  case CHAT_MSG_AFK:
449  {
450  if (!_player->IsInCombat())
451  {
452  if (!msg.empty() || !_player->isAFK())
453  {
454  if (msg.empty())
456  else
457  _player->autoReplyMsg = msg;
458  }
459  if (msg.empty() || !_player->isAFK())
460  {
461  _player->ToggleAFK();
462  if (_player->isAFK() && _player->isDND())
463  _player->ToggleDND();
464  }
465  }
466  }
467  break;
468  case CHAT_MSG_DND:
469  {
470  std::string msg;
471  recv_data >> msg;
472 
473  if (!msg.empty() || !_player->isDND())
474  {
475  if (msg.empty())
477  else
478  _player->autoReplyMsg = msg;
479  }
480  if (msg.empty() || !_player->isDND())
481  {
482  _player->ToggleDND();
483  if (_player->isDND() && _player->isAFK())
484  _player->ToggleAFK();
485  }
486  }
487  break;
488 
489  default:
490  sLog.outError("CHAT: unknown message type %u, lang: %u", type, lang);
491  break;
492  }
493 }
494 
496 {
497  if (!GetPlayer()->IsAlive() || GetPlayer()->HasUnitState(UNIT_STATE_DIED))
498  return;
499 
500  uint32 emote;
501  recv_data >> emote;
502  GetPlayer()->HandleEmoteCommand(emote);
503 }
504 
506 {
507  if (!GetPlayer()->IsAlive())
508  return;
509 
510  if (!GetPlayer()->CanSpeak())
511  {
512  std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
514  return;
515  }
516 
517  uint32 text_emote, emoteNum;
518  uint64 guid;
519 
520  recv_data >> text_emote;
521  recv_data >> emoteNum;
522  recv_data >> guid;
523 
524  EmotesTextEntry const* em = sEmotesTextStore.LookupEntry(text_emote);
525  if (!em)
526  return;
527 
528  uint32 emote_anim = em->textid;
529 
530  switch (emote_anim)
531  {
532  case EMOTE_STATE_SLEEP:
533  case EMOTE_STATE_SIT:
534  case EMOTE_STATE_KNEEL:
535  case EMOTE_ONESHOT_NONE:
536  break;
537  default:
538  // Only allow text-emotes for "dead" entities (feign death included)
539  if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
540  break;
541 
542  GetPlayer()->HandleEmoteCommand(emote_anim);
543  break;
544  }
545 
546  const char* nam = 0;
547  uint32 namlen = 1;
548 
549  Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
550  if (unit)
551  {
552  nam = unit->GetName();
553  namlen = (nam ? strlen(nam) : 0) + 1;
554  }
555 
556  WorldPacket data;
557  data.Initialize(SMSG_TEXT_EMOTE, (20 + namlen));
558  data << GetPlayer()->GetGUID();
559  data << (uint32)text_emote;
560  data << emoteNum;
561  data << (uint32)namlen;
562  if (namlen > 1)
563  data.append(nam, namlen);
564  else
565  data << (uint8)0x00;
566 
568 
569  //Send scripted event call
570  if (unit && unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->AI())
571  unit->ToCreature()->AI()->ReceiveEmote(GetPlayer(), text_emote);
572 }
573 
575 {
576  uint64 iguid;
577  uint8 unk;
578  //sLog.outDebug("WORLD: Received CMSG_CHAT_IGNORED");
579 
580  recv_data >> iguid;
581  recv_data >> unk; // probably related to spam reporting
582 
583  Player* player = sObjectMgr.GetPlayer(iguid);
584  if (!player || !player->GetSession())
585  return;
586 
587  WorldPacket data;
588  ChatHandler::FillMessageData(&data, this, CHAT_MSG_IGNORED, LANG_UNIVERSAL, NULL, GetPlayer()->GetGUID(), GetPlayer()->GetName(), NULL);
589  player->GetSession()->SendPacket(&data);
590 }
591 
593 {
594  WorldPacket data(SMSG_CHAT_PLAYER_NOT_FOUND, name.size() + 1);
595  data << name;
596  SendPacket(&data);
597 }
598 
600 {
602  SendPacket(&data);
603 }
604 
void SendNotification(const char *format,...) ATTR_PRINTF(2
Group * GetGroup()
Definition: Player.h:2589
bool isDND() const
Definition: Player.h:981
void Yell(const std::string &text, const uint32 language)
Definition: Player.cpp:17257
void HandleMessagechatOpcode(WorldPacket &recvPacket)
Definition: ChatHandler.cpp:60
bool processChatmessageFurtherAfterSecurityChecks(std::string &, uint32)
Definition: ChatHandler.cpp:38
bool isRaidGroup() const
Definition: Group.h:210
bool HasSkill(uint32 skill) const
Definition: Player.cpp:5536
bool IsInCombat() const
Definition: Unit.h:1318
void BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0)
Definition: Group.cpp:1027
void Whisper(const std::string &text, const uint32 language, uint64 receiver)
Definition: Player.cpp:17279
#define sLog
Log class singleton.
Definition: Log.h:187
void ToggleDND()
Definition: Player.cpp:1534
ACE_INT32 int32
Definition: Define.h:67
void SendMessageToSetInRange(WorldPacket *data, float fist, bool self) override
Definition: Player.cpp:5764
void SendPlayerNotFoundNotice(std::string name)
std::list< Aura * > AuraList
Definition: Unit.h:893
std::string const & GetName() const
Definition: Guild.h:286
bool isAcceptWhispers() const
Definition: Player.h:1000
bool IsAssistant(uint64 guid) const
Definition: Group.h:264
void Initialize(uint16 opcode, size_t newres=200)
Definition: WorldPacket.h:37
bool IsGameMaster() const
Definition: Player.h:1009
int ParseCommands(const char *text)
Definition: Chat.cpp:935
Player * GetPlayer() const
Definition: WorldSession.h:104
bool CanSpeak() const
Definition: Player.cpp:16837
const char * GetLeaderName() const
Definition: Group.h:226
#define sObjectMgr
Definition: ObjectMgr.h:1285
void SendPacket(WorldPacket const *packet)
void BroadcastToGuild(WorldSession *session, const std::string &msg, uint32 language=LANG_UNIVERSAL)
Definition: Guild.cpp:577
void UpdateSpeakTime()
Definition: Player.cpp:16807
void HandleChatIgnoredOpcode(WorldPacket &recvPacket)
uint8 GetTypeId() const
Definition: Object.h:204
bool normalizePlayerName(std::string &name)
Definition: ObjectMgr.cpp:225
ACE_UINT8 uint8
Definition: Define.h:73
bool IsLeader(const uint64 &guid) const
Definition: Group.h:251
time_t m_muteTime
Definition: WorldSession.h:230
uint32 skill_id
Definition: ObjectMgr.h:506
void HandleEmoteOpcode(WorldPacket &recvPacket)
void SendWrongFactionNotice()
bool isBGGroup() const
Definition: Group.h:214
std::string autoReplyMsg
Definition: Player.h:983
const char * GetOregonString(int32 entry) const
void HandleTextEmoteOpcode(WorldPacket &recvPacket)
uint32 GetGuildId()
Definition: Player.h:1837
std::string secsToTimeString(uint32 timeInSecs, bool shortText, bool hoursOnly)
Definition: Util.cpp:148
const char * GetName() const
Definition: Object.h:692
LanguageDesc const * GetLanguageDescByID(uint32 lang)
Definition: ObjectMgr.cpp:269
ACE_UINT64 uint64
Definition: Define.h:70
void ToggleAFK()
Definition: Player.cpp:1522
void append(const std::string &str)
Definition: ByteBuffer.h:358
Group * GetOriginalGroup()
Definition: Player.h:2632
Player * _player
Definition: WorldSession.h:729
void BroadcastToOfficers(WorldSession *session, const std::string &msg, uint32 language=LANG_UNIVERSAL)
Definition: Guild.cpp:594
uint32 GetTeam() const
Definition: Player.h:2075
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1921
static Unit * GetUnit(WorldObject const &, uint64 guid)
bool isAFK() const
Definition: Player.h:980
WorldSession * GetSession() const
Definition: Player.h:1959
#define sWorld
Definition: World.h:860
uint8 GetMemberGroup(uint64 guid) const
Definition: Group.h:314
AuraList const & GetAurasByType(AuraType type) const
Definition: Unit.h:1856
void uint32 GetSecurity() const
Definition: WorldSession.h:96
size_t rpos() const
Definition: ByteBuffer.h:253
ACE_UINT32 uint32
Definition: Define.h:71
Definition: Guild.h:265
void TextEmote(const std::string &text)
Definition: Player.cpp:17268
Definition: Unit.h:884
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
bool isValidChatMessage(const char *msg)
Definition: Chat.cpp:971
Definition: Player.h:922
#define MAX_CHAT_MSG_TYPE
ChannelMgr * channelMgr(uint32 team)
Definition: ChannelMgr.h:91
Definition: Group.h:154
static void FillMessageData(WorldPacket *data, WorldSession *session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker)
Definition: Chat.cpp:1515
void Say(const std::string &text, const uint32 language)
Definition: Player.cpp:17246
const uint64 & GetGUID() const
Definition: Object.h:156
void stripLineInvisibleChars(std::string &str)
Definition: Util.cpp:115