TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CliHandler Class Reference

#include <Chat.h>

Public Types

typedef void Print (void *, char const *)
 

Public Member Functions

 CliHandler (void *callbackArg, Print *zprint)
 
char constGetTrinityString (uint32 entry) const override
 
bool isAvailable (ChatCommand const &cmd) const override
 
bool HasPermission (uint32) const override
 
void SendSysMessage (const char *str, bool escapeCharacters) override
 
std::string GetNameLink () const override
 
bool needReportToTarget (Player *chr) const override
 
LocaleConstant GetSessionDbcLocale () const override
 
int GetSessionDbLocaleIndex () const override
 
- Public Member Functions inherited from ChatHandler
WorldSessionGetSession ()
 
 ChatHandler (WorldSession *session)
 
virtual ~ChatHandler ()
 
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 (const char *text)
 
bool isValidChatMessage (const char *msg)
 
void SendGlobalSysMessage (const char *str)
 
bool hasStringAbbr (const char *name, const char *part)
 
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=NULL)
 
char * extractKeyFromLink (char *text, char const *const *linkTypes, int *found_idx, char **something1=NULL)
 
void extractOptFirstArg (char *args, char **arg1, char **arg2)
 
char * extractQuotedArg (char *args)
 
uint32 extractSpellIdFromLink (char *text)
 
ObjectGuid extractGuidFromLink (char *text)
 
GameTele constextractGameTeleFromLink (char *text)
 
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=NULL, std::string *player_name=NULL)
 
std::string playerLink (std::string const &name) const
 
std::string GetNameLink (Player *chr) const
 
GameObjectGetNearbyGameObject ()
 
GameObjectGetObjectGlobalyWithGuidOrNearWithDbGuid (ObjectGuid::LowType lowguid, uint32 entry)
 
bool HasSentErrorMessage () const
 
void SetSentErrorMessage (bool val)
 
bool ShowHelpForCommand (std::vector< ChatCommand > const &table, const char *cmd)
 

Private Attributes

void * m_callbackArg
 
Printm_print
 

Additional Inherited Members

- Static Public Member Functions inherited from ChatHandler
static char * LineFromMessage (char *&pos)
 
static std::vector
< ChatCommand > const
getCommandTable ()
 
static bool LoadCommandTable ()
 
static void SetLoadCommandTable (bool val)
 
- Protected Member Functions inherited from ChatHandler
 ChatHandler ()
 
bool ExecuteCommandInTable (std::vector< ChatCommand > const &table, const char *text, std::string const &fullcmd)
 
bool ShowHelpForSubCommands (std::vector< ChatCommand > const &table, char const *cmd, char const *subcmd)
 
- Static Protected Member Functions inherited from ChatHandler
static bool SetDataForCommandInTable (std::vector< ChatCommand > &table, const char *text, uint32 permission, std::string const &help, std::string const &fullcommand)
 

Member Typedef Documentation

typedef void CliHandler::Print(void *, char const *)

Constructor & Destructor Documentation

CliHandler::CliHandler ( void *  callbackArg,
Print zprint 
)
inlineexplicit
161 : m_callbackArg(callbackArg), m_print(zprint) { }
Print * m_print
Definition: Chat.h:175
void * m_callbackArg
Definition: Chat.h:174

Member Function Documentation

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

Reimplemented from ChatHandler.

1095 {
1097 }
char const * GetTrinityString(uint32 entry) const override
Definition: Chat.cpp:1077
Definition: Language.h:204

+ Here is the call graph for this function:

LocaleConstant CliHandler::GetSessionDbcLocale ( ) const
overridevirtual

Reimplemented from ChatHandler.

1149 {
1150  return sWorld->GetDefaultDbcLocale();
1151 }
#define sWorld
Definition: World.h:887
int CliHandler::GetSessionDbLocaleIndex ( ) const
overridevirtual

Reimplemented from ChatHandler.

1154 {
1155  return sObjectMgr->GetDBCLocaleIndex();
1156 }
#define sObjectMgr
Definition: ObjectMgr.h:1567
char const * CliHandler::GetTrinityString ( uint32  entry) const
overridevirtual

Reimplemented from ChatHandler.

1078 {
1079  return sObjectMgr->GetTrinityStringForDBCLocale(entry);
1080 }
#define sObjectMgr
Definition: ObjectMgr.h:1567

+ Here is the caller graph for this function:

bool CliHandler::HasPermission ( uint32  ) const
inlineoverridevirtual

Reimplemented from ChatHandler.

166 { return true; }
bool CliHandler::isAvailable ( ChatCommand const cmd) const
overridevirtual

Reimplemented from ChatHandler.

1083 {
1084  // skip non-console commands in console case
1085  return cmd.AllowConsole;
1086 }
bool CliHandler::needReportToTarget ( Player chr) const
overridevirtual

Reimplemented from ChatHandler.

1100 {
1101  return true;
1102 }
void CliHandler::SendSysMessage ( const char *  str,
bool  escapeCharacters 
)
overridevirtual

Reimplemented from ChatHandler.

1089 {
1090  m_print(m_callbackArg, str);
1091  m_print(m_callbackArg, "\r\n");
1092 }
Print * m_print
Definition: Chat.h:175
void * m_callbackArg
Definition: Chat.h:174

Member Data Documentation

void* CliHandler::m_callbackArg
private
Print* CliHandler::m_print
private

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