ZNC trunk
Loading...
Searching...
No Matches
CModeMessage Class Reference

#include <Message.h>

Inheritance diagram for CModeMessage:
Collaboration diagram for CModeMessage:

Public Types

enum class  Type {
  Unknown , Account , Action , Authenticate ,
  Away , Capability , ChgHost , CTCP ,
  Error , Invite , Join , Kick ,
  Mode , Nick , Notice , Numeric ,
  Part , Ping , Pong , Quit ,
  TagMsg , Text , Topic , Wallops
}
enum  FormatFlags { IncludeAll = 0x0 , ExcludePrefix = 0x1 , ExcludeTags = 0x2 }

Public Member Functions

CString GetModes () const
CString GetModeList () const
VCString GetModeParams () const
bool HasModes () const
CString GetTarget () const
void SetTarget (const CString &sTarget)
Type GetType () const
 Returns which type of message this is.
bool Equals (const CMessage &Other) const
void Clone (const CMessage &Other)
CIRCNetworkGetNetwork () const
void SetNetwork (CIRCNetwork *pNetwork)
CClientGetClient () const
void SetClient (CClient *pClient)
CChanGetChan () const
void SetChan (CChan *pChan)
CNickGetNick ()
const CNickGetNick () const
void SetNick (const CNick &Nick)
const CStringGetCommand () const
void SetCommand (const CString &sCommand)
const VCStringGetParams () const
CString GetParams (unsigned int uIdx, unsigned int uLen=-1) const ZNC_MSG_DEPRECATED("Use GetParamsColon() instead")
VCString GetParamsSplit (unsigned int uIdx, unsigned int uLen=-1) const
 Get a subset of the message parameters.
void SetParams (const VCString &vsParams)
void SetParams (VCString &&vsParams)
CString GetParamsColon (unsigned int uIdx, unsigned int uLen=-1) const
CString GetParam (unsigned int uIdx) const
void SetParam (unsigned int uIdx, const CString &sParam)
const timeval & GetTime () const
void SetTime (const timeval &ts)
const MCStringGetTags () const
MCStringGetTags ()
void SetTags (const MCString &mssTags)
CString GetTag (const CString &sKey) const
void SetTag (const CString &sKey, const CString &sValue)
CString ToString (unsigned int uFlags=IncludeAll) const
void Parse (const CString &sMessage)
template<typename M>
M & As () &
template<typename M>
const M & As () const &
template<typename M, typename = typename std::enable_if< std::is_base_of<CMessage, M>{}>::type>
 operator M& () &
template<typename M, typename = typename std::enable_if< std::is_base_of<CMessage, M>{}>::type>
 operator const M & () const &

Member Enumeration Documentation

◆ FormatFlags

enum CMessage::FormatFlags
inherited
Enumerator
IncludeAll 
ExcludePrefix 
ExcludeTags 

◆ Type

enum class CMessage::Type
stronginherited
Enumerator
Unknown 
Account 
Action 
Authenticate 
Away 
Capability 
ChgHost 
CTCP 
Error 
Invite 
Join 
Kick 
Mode 
Nick 
Notice 
Numeric 
Part 
Ping 
Pong 
Quit 
TagMsg 
Text 
Topic 
Wallops 

Member Function Documentation

◆ As() [1/2]

template<typename M>
M & CMessage::As ( ) &
inlineinherited

References CMessage().

Referenced by operator const M &(), and operator M&().

◆ As() [2/2]

template<typename M>
const M & CMessage::As ( ) const &
inlineinherited

References CMessage().

◆ Clone()

void CMessage::Clone ( const CMessage & Other)
inherited

References CMessage().

◆ Equals()

bool CMessage::Equals ( const CMessage & Other) const
inherited

References CMessage().

◆ GetChan()

CChan * CMessage::GetChan ( ) const
inlineinherited

◆ GetClient()

CClient * CMessage::GetClient ( ) const
inlineinherited

◆ GetCommand()

const CString & CMessage::GetCommand ( ) const
inlineinherited

◆ GetModeList()

CString CModeMessage::GetModeList ( ) const
inline

References CMessage::GetParam().

Referenced by HasModes().

◆ GetModeParams()

VCString CModeMessage::GetModeParams ( ) const
inline

◆ GetModes()

CString CModeMessage::GetModes ( ) const
inline

◆ GetNetwork()

CIRCNetwork * CMessage::GetNetwork ( ) const
inlineinherited

◆ GetNick() [1/2]

CNick & CMessage::GetNick ( )
inlineinherited

◆ GetNick() [2/2]

const CNick & CMessage::GetNick ( ) const
inlineinherited

◆ GetParam()

◆ GetParams() [1/2]

const VCString & CMessage::GetParams ( ) const
inlineinherited

◆ GetParams() [2/2]

CString CMessage::GetParams ( unsigned int uIdx,
unsigned int uLen = -1 ) const
inlineinherited

◆ GetParamsColon()

CString CMessage::GetParamsColon ( unsigned int uIdx,
unsigned int uLen = -1 ) const
inherited

◆ GetParamsSplit()

VCString CMessage::GetParamsSplit ( unsigned int uIdx,
unsigned int uLen = -1 ) const
inherited

Get a subset of the message parameters.

This allows accessing a vector of a specific range of parameters, allowing easy inline use, such as pChan->SetModes(Message.GetParam(2), Message.GetParamsSplit(3));

Parameters
uIdxThe index of the first parameter to retrieve
uLenHow many parameters to retrieve
Returns
A VCString containing the retrieved parameters

Referenced by CModeMessage::GetModeParams().

◆ GetTag()

CString CMessage::GetTag ( const CString & sKey) const
inherited

◆ GetTags() [1/2]

MCString & CMessage::GetTags ( )
inlineinherited

◆ GetTags() [2/2]

const MCString & CMessage::GetTags ( ) const
inlineinherited

◆ GetTarget()

CString CTargetMessage::GetTarget ( ) const
inlineinherited

References CMessage::GetParam().

◆ GetTime()

const timeval & CMessage::GetTime ( ) const
inlineinherited

◆ GetType()

Type CMessage::GetType ( ) const
inlineinherited

Returns which type of message this is.

This is mostly about which subclass of CMessage is intended to be used, but does not map 1:1 to the subclasses. The number is NOT guaranteed to be the same across ZNC versions. For practical purposes, GetCommand() may be more useful.

◆ HasModes()

bool CModeMessage::HasModes ( ) const
inline

References GetModeList().

◆ operator const M &()

template<typename M, typename = typename std::enable_if< std::is_base_of<CMessage, M>{}>::type>
CMessage::operator const M & ( ) const &
inlineinherited

References As().

◆ operator M&()

template<typename M, typename = typename std::enable_if< std::is_base_of<CMessage, M>{}>::type>
CMessage::operator M& ( ) &
inlineinherited

References As().

◆ Parse()

void CMessage::Parse ( const CString & sMessage)
inherited

◆ SetChan()

void CMessage::SetChan ( CChan * pChan)
inlineinherited

◆ SetClient()

void CMessage::SetClient ( CClient * pClient)
inlineinherited

◆ SetCommand()

void CMessage::SetCommand ( const CString & sCommand)
inherited

◆ SetNetwork()

void CMessage::SetNetwork ( CIRCNetwork * pNetwork)
inlineinherited

◆ SetNick()

void CMessage::SetNick ( const CNick & Nick)
inlineinherited

References Nick.

◆ SetParam()

◆ SetParams() [1/2]

void CMessage::SetParams ( const VCString & vsParams)
inherited

◆ SetParams() [2/2]

void CMessage::SetParams ( VCString && vsParams)
inherited

◆ SetTag()

void CMessage::SetTag ( const CString & sKey,
const CString & sValue )
inherited

◆ SetTags()

void CMessage::SetTags ( const MCString & mssTags)
inlineinherited

◆ SetTarget()

void CTargetMessage::SetTarget ( const CString & sTarget)
inlineinherited

References CMessage::SetParam().

◆ SetTime()

void CMessage::SetTime ( const timeval & ts)
inlineinherited

◆ ToString()

CString CMessage::ToString ( unsigned int uFlags = IncludeAll) const
inherited

References IncludeAll.


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