TrinityCore
ChatHandler Class Reference

#include <Chat.h>

+ Inheritance diagram for ChatHandler:

Public Member Functions

bool IsConsole () const
 
WorldSessionGetSession ()
 
WorldSession const * GetSession () const
 
PlayerGetPlayer () const
 
 ChatHandler (WorldSession *session)
 
virtual ~ChatHandler ()
 
virtual char const * GetTrinityString (uint32 entry) const
 
virtual void SendSysMessage (std::string_view str, bool escapeCharacters=false)
 
void SendSysMessage (uint32 entry)
 
template<typename... Args>
void PSendSysMessage (const char *fmt, Args &&... args)
 
template<typename... Args>
void PSendSysMessage (uint32 entry, Args &&... args)
 
template<typename... Args>
std::string PGetParseString (uint32 entry, Args &&... args) const
 
bool _ParseCommands (std::string_view text)
 
virtual bool ParseCommands (std::string_view text)
 
void SendGlobalSysMessage (const char *str)
 
virtual bool IsHumanReadable () const
 
virtual bool HasPermission (uint32 permission) const
 
virtual std::string GetNameLink () const
 
virtual bool needReportToTarget (Player *chr) const
 
virtual LocaleConstant GetSessionDbcLocale () const
 
virtual LocaleConstant GetSessionDbLocaleIndex () const
 
bool HasLowerSecurity (Player *target, ObjectGuid guid, bool strong=false)
 
bool HasLowerSecurityAccount (WorldSession *target, uint32 account, bool strong=false)
 
void SendGlobalGMSysMessage (const char *str)
 
PlayergetSelectedPlayer ()
 
CreaturegetSelectedCreature ()
 
UnitgetSelectedUnit ()
 
WorldObjectgetSelectedObject ()
 
PlayergetSelectedPlayerOrSelf ()
 
char * extractKeyFromLink (char *text, char const *linkType, char **something1=nullptr)
 
char * extractKeyFromLink (char *text, char const *const *linkTypes, int *found_idx, char **something1=nullptr)
 
char * extractQuotedArg (char *args)
 
ObjectGuid::LowType extractLowGuidFromLink (char *text, HighGuid &guidHigh)
 
bool GetPlayerGroupAndGUIDByName (const char *cname, Player *&player, Group *&group, ObjectGuid &guid, bool offline=false)
 
std::string extractPlayerNameFromLink (char *text)
 
bool extractPlayerTarget (char *args, Player **player, ObjectGuid *player_guid=nullptr, std::string *player_name=nullptr)
 
std::string playerLink (std::string const &name) const
 
std::string GetNameLink (Player *chr) const
 
GameObjectGetNearbyGameObject ()
 
GameObjectGetObjectFromPlayerMapByDbGuid (ObjectGuid::LowType lowguid)
 
CreatureGetCreatureFromPlayerMapByDbGuid (ObjectGuid::LowType lowguid)
 
bool HasSentErrorMessage () const
 
void SetSentErrorMessage (bool val)
 

Static Public Member Functions

static char * LineFromMessage (char *&pos)
 

Protected Member Functions

 ChatHandler ()
 

Private Attributes

WorldSessionm_session
 
bool sentErrorMessage
 

Detailed Description

Definition at line 38 of file Chat.h.

Constructor & Destructor Documentation

◆ ChatHandler() [1/2]

ChatHandler::ChatHandler ( WorldSession session)
inlineexplicit

Definition at line 45 of file Chat.h.

◆ ~ChatHandler()

virtual ChatHandler::~ChatHandler ( )
inlinevirtual

Definition at line 46 of file Chat.h.

◆ ChatHandler() [2/2]

ChatHandler::ChatHandler ( )
inlineexplicitprotected

Definition at line 116 of file Chat.h.

Member Function Documentation

◆ _ParseCommands()

bool ChatHandler::_ParseCommands ( std::string_view  text)

Definition at line 162 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractKeyFromLink() [1/2]

char * ChatHandler::extractKeyFromLink ( char *  text,
char const *const *  linkTypes,
int *  found_idx,
char **  something1 = nullptr 
)

Definition at line 310 of file Chat.cpp.

+ Here is the call graph for this function:

◆ extractKeyFromLink() [2/2]

char * ChatHandler::extractKeyFromLink ( char *  text,
char const *  linkType,
char **  something1 = nullptr 
)

Definition at line 262 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractLowGuidFromLink()

ObjectGuid::LowType ChatHandler::extractLowGuidFromLink ( char *  text,
HighGuid guidHigh 
)

Definition at line 428 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractPlayerNameFromLink()

std::string ChatHandler::extractPlayerNameFromLink ( char *  text)

Definition at line 475 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractPlayerTarget()

bool ChatHandler::extractPlayerTarget ( char *  args,
Player **  player,
ObjectGuid player_guid = nullptr,
std::string *  player_name = nullptr 
)

Definition at line 489 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractQuotedArg()

char * ChatHandler::extractQuotedArg ( char *  args)

Definition at line 546 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ GetCreatureFromPlayerMapByDbGuid()

Creature * ChatHandler::GetCreatureFromPlayerMapByDbGuid ( ObjectGuid::LowType  lowguid)

Definition at line 397 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNameLink() [1/2]

std::string ChatHandler::GetNameLink ( ) const
virtual

Reimplemented in CliHandler.

Definition at line 58 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNameLink() [2/2]

std::string ChatHandler::GetNameLink ( Player chr) const

Definition at line 607 of file Chat.cpp.

+ Here is the call graph for this function:

◆ GetNearbyGameObject()

GameObject * ChatHandler::GetNearbyGameObject ( )

Definition at line 374 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetObjectFromPlayerMapByDbGuid()

GameObject * ChatHandler::GetObjectFromPlayerMapByDbGuid ( ObjectGuid::LowType  lowguid)

Definition at line 387 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPlayer()

Player * ChatHandler::GetPlayer ( ) const

Definition at line 39 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPlayerGroupAndGUIDByName()

bool ChatHandler::GetPlayerGroupAndGUIDByName ( const char *  cname,
Player *&  player,
Group *&  group,
ObjectGuid guid,
bool  offline = false 
)

Definition at line 643 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedCreature()

Creature * ChatHandler::getSelectedCreature ( )

Definition at line 236 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedObject()

WorldObject * ChatHandler::getSelectedObject ( )

Definition at line 223 of file Chat.cpp.

+ Here is the call graph for this function:

◆ getSelectedPlayer()

Player * ChatHandler::getSelectedPlayer ( )

Definition at line 200 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedPlayerOrSelf()

Player * ChatHandler::getSelectedPlayerOrSelf ( )

Definition at line 244 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedUnit()

Unit * ChatHandler::getSelectedUnit ( )

Definition at line 212 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSession() [1/2]

WorldSession * ChatHandler::GetSession ( )
inline

Definition at line 42 of file Chat.h.

◆ GetSession() [2/2]

WorldSession const * ChatHandler::GetSession ( ) const
inline

Definition at line 43 of file Chat.h.

◆ GetSessionDbcLocale()

LocaleConstant ChatHandler::GetSessionDbcLocale ( ) const
virtual

Reimplemented in CliHandler.

Definition at line 592 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSessionDbLocaleIndex()

LocaleConstant ChatHandler::GetSessionDbLocaleIndex ( ) const
virtual

Reimplemented in CliHandler.

Definition at line 597 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTrinityString()

char const * ChatHandler::GetTrinityString ( uint32  entry) const
virtual

Reimplemented in CliHandler.

Definition at line 48 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasLowerSecurity()

bool ChatHandler::HasLowerSecurity ( Player target,
ObjectGuid  guid,
bool  strong = false 
)

Definition at line 63 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasLowerSecurityAccount()

bool ChatHandler::HasLowerSecurityAccount ( WorldSession target,
uint32  account,
bool  strong = false 
)

Definition at line 83 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasPermission()

bool ChatHandler::HasPermission ( uint32  permission) const
virtual

Reimplemented in CliHandler.

Definition at line 53 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ HasSentErrorMessage()

bool ChatHandler::HasSentErrorMessage ( ) const
inline

Definition at line 113 of file Chat.h.

+ Here is the caller graph for this function:

◆ IsConsole()

bool ChatHandler::IsConsole ( ) const
inline

Definition at line 41 of file Chat.h.

+ Here is the caller graph for this function:

◆ IsHumanReadable()

virtual bool ChatHandler::IsHumanReadable ( ) const
inlinevirtual

Reimplemented in AddonChannelCommandHandler.

Definition at line 80 of file Chat.h.

◆ LineFromMessage()

char * ChatHandler::LineFromMessage ( char *&  pos)
static

Definition at line 41 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ needReportToTarget()

bool ChatHandler::needReportToTarget ( Player chr) const
virtual

Reimplemented in CliHandler.

Definition at line 586 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseCommands()

bool ChatHandler::ParseCommands ( std::string_view  text)
virtual

Reimplemented in CliHandler, and AddonChannelCommandHandler.

Definition at line 177 of file Chat.cpp.

+ Here is the call graph for this function:

◆ PGetParseString()

template<typename... Args>
std::string ChatHandler::PGetParseString ( uint32  entry,
Args &&...  args 
) const
inline

Definition at line 69 of file Chat.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ playerLink()

std::string ChatHandler::playerLink ( std::string const &  name) const

Definition at line 602 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ PSendSysMessage() [1/2]

template<typename... Args>
void ChatHandler::PSendSysMessage ( const char *  fmt,
Args &&...  args 
)
inline

Definition at line 57 of file Chat.h.

◆ PSendSysMessage() [2/2]

template<typename... Args>
void ChatHandler::PSendSysMessage ( uint32  entry,
Args &&...  args 
)
inline

Definition at line 63 of file Chat.h.

◆ SendGlobalGMSysMessage()

void ChatHandler::SendGlobalGMSysMessage ( const char *  str)

Definition at line 147 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendGlobalSysMessage()

void ChatHandler::SendGlobalSysMessage ( const char *  str)

Definition at line 137 of file Chat.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSysMessage() [1/2]

void ChatHandler::SendSysMessage ( std::string_view  str,
bool  escapeCharacters = false 
)
virtual

Reimplemented in AddonChannelCommandHandler, CliHandler, and AddonChannelCommandHandler.

Definition at line 113 of file Chat.cpp.

+ Here is the call graph for this function:

◆ SendSysMessage() [2/2]

void ChatHandler::SendSysMessage ( uint32  entry)

Definition at line 157 of file Chat.cpp.

+ Here is the call graph for this function:

◆ SetSentErrorMessage()

void ChatHandler::SetSentErrorMessage ( bool  val)
inline

Definition at line 114 of file Chat.h.

Member Data Documentation

◆ m_session

WorldSession* ChatHandler::m_session
private

Definition at line 119 of file Chat.h.

◆ sentErrorMessage

bool ChatHandler::sentErrorMessage
private

Definition at line 122 of file Chat.h.


The documentation for this class was generated from the following files: