TrinityCore
CliHandler Class Reference

#include <Chat.h>

+ Inheritance diagram for CliHandler:

Public Types

using Print = void(void *, std::string_view)
 

Public Member Functions

 CliHandler (void *callbackArg, Print *zprint)
 
char const * GetTrinityString (uint32 entry) const override
 
bool HasPermission (uint32) const override
 
void SendSysMessage (std::string_view, bool escapeCharacters) override
 
bool ParseCommands (std::string_view str) override
 
std::string GetNameLink () const override
 
bool needReportToTarget (Player *chr) const override
 
LocaleConstant GetSessionDbcLocale () const override
 
LocaleConstant GetSessionDbLocaleIndex () const override
 
- Public Member Functions inherited from ChatHandler
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)
 

Private Attributes

void * m_callbackArg
 
Printm_print
 

Additional Inherited Members

- Static Public Member Functions inherited from ChatHandler
static char * LineFromMessage (char *&pos)
 
- Protected Member Functions inherited from ChatHandler
 ChatHandler ()
 

Detailed Description

Definition at line 125 of file Chat.h.

Member Typedef Documentation

◆ Print

using CliHandler::Print = void(void*, std::string_view)

Definition at line 128 of file Chat.h.

Constructor & Destructor Documentation

◆ CliHandler()

CliHandler::CliHandler ( void *  callbackArg,
Print zprint 
)
inlineexplicit

Definition at line 129 of file Chat.h.

Member Function Documentation

◆ GetNameLink()

std::string CliHandler::GetNameLink ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 633 of file Chat.cpp.

+ Here is the call graph for this function:

◆ GetSessionDbcLocale()

LocaleConstant CliHandler::GetSessionDbcLocale ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 687 of file Chat.cpp.

◆ GetSessionDbLocaleIndex()

LocaleConstant CliHandler::GetSessionDbLocaleIndex ( ) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 692 of file Chat.cpp.

◆ GetTrinityString()

char const * CliHandler::GetTrinityString ( uint32  entry) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 612 of file Chat.cpp.

+ Here is the caller graph for this function:

◆ HasPermission()

bool CliHandler::HasPermission ( uint32  ) const
inlineoverridevirtual

Reimplemented from ChatHandler.

Definition at line 133 of file Chat.h.

◆ needReportToTarget()

bool CliHandler::needReportToTarget ( Player chr) const
overridevirtual

Reimplemented from ChatHandler.

Definition at line 638 of file Chat.cpp.

◆ ParseCommands()

bool CliHandler::ParseCommands ( std::string_view  str)
overridevirtual

Reimplemented from ChatHandler.

Definition at line 623 of file Chat.cpp.

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

◆ SendSysMessage()

void CliHandler::SendSysMessage ( std::string_view  str,
bool  escapeCharacters 
)
overridevirtual

Reimplemented from ChatHandler.

Definition at line 617 of file Chat.cpp.

Member Data Documentation

◆ m_callbackArg

void* CliHandler::m_callbackArg
private

Definition at line 142 of file Chat.h.

◆ m_print

Print* CliHandler::m_print
private

Definition at line 143 of file Chat.h.


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