ZNC
trunk
|
#include <Chan.h>
Public Types | |
enum | EUserPerms { Voice = '+' , HalfOp = '' , Op = '@' , Admin = '!' , Owner = '*' } |
enum | EModes { M_Private = 'p' , M_Secret = 's' , M_Moderated = 'm' , M_InviteOnly = 'i' , M_NoMessages = 'n' , M_OpTopic = 't' , M_Limit = 'l' , M_Key = 'k' , M_Op = 'o' , M_Voice = 'v' , M_Ban = 'b' , M_Except = 'e' } |
Public Member Functions | |
CChan (const CString &sName, CIRCNetwork *pNetwork, bool bInConfig, CConfig *pConfig=nullptr) | |
~CChan () | |
CChan (const CChan &)=delete | |
CChan & | operator= (const CChan &)=delete |
void | Reset () |
CConfig | ToConfig () const |
void | Clone (CChan &chan) |
void | Cycle () const |
void | JoinUser (const CString &sKey="") |
void | AttachUser (CClient *pClient=nullptr) |
void | DetachUser () |
void | OnWho (const CString &sNick, const CString &sIdent, const CString &sHost) |
void | SetModes (const CString &s) |
void | SetModes (const CString &sModes, const VCString &vsModeParams) |
Set the current modes for this channel. More... | |
void | ModeChange (const CString &sModes, const CNick *OpNick=nullptr) |
void | ModeChange (const CString &sModes, const VCString &vsModeParams, const CNick *OpNick=nullptr) |
Handle changing the modes on a channel. More... | |
bool | AddMode (char cMode, const CString &sArg) |
bool | RemMode (char cMode) |
CString | GetModeString () const |
CString | GetModeArg (CString &sArgs) const |
CString | GetModeForNames () const |
void | ClearNicks () |
const CNick * | FindNick (const CString &sNick) const |
CNick * | FindNick (const CString &sNick) |
int | AddNicks (const CString &sNicks) |
bool | AddNick (const CString &sNick) |
bool | RemNick (const CString &sNick) |
bool | ChangeNick (const CString &sOldNick, const CString &sNewNick) |
const CBuffer & | GetBuffer () const |
unsigned int | GetBufferCount () const |
bool | SetBufferCount (unsigned int u, bool bForce=false) |
void | InheritBufferCount (unsigned int u, bool bForce=false) |
void | ResetBufferCount () |
size_t | AddBuffer (const CMessage &Format, const CString &sText="") |
size_t | AddBuffer (const CString &sFormat, const CString &sText="", const timeval *ts=nullptr, const MCString &mssTags=MCString::EmptyMap) |
void | ClearBuffer () |
void | SendBuffer (CClient *pClient) |
void | SendBuffer (CClient *pClient, const CBuffer &Buffer) |
CString | GetPermStr () const |
e.g. '@' for chanop. More... | |
bool | HasPerm (char cPerm) const |
e.g. '@' for chanop. More... | |
bool | AddPerm (char cPerm) |
e.g. '@' for chanop. More... | |
bool | RemPerm (char cPerm) |
e.g. '@' for chanop. More... | |
void | SetModeKnown (bool b) |
void | SetIsOn (bool b) |
void | SetKey (const CString &s) |
void | SetTopic (const CString &s) |
void | SetTopicOwner (const CString &s) |
void | SetTopicDate (unsigned long u) |
void | SetDefaultModes (const CString &s) |
void | SetAutoClearChanBuffer (bool b) |
void | InheritAutoClearChanBuffer (bool b) |
void | ResetAutoClearChanBuffer () |
void | SetDetached (bool b=true) |
void | SetInConfig (bool b) |
void | SetCreationDate (unsigned long u) |
void | Disable () |
void | Enable () |
void | IncJoinTries () |
void | ResetJoinTries () |
CIRCNetwork * | GetNetwork () const |
bool | IsModeKnown () const |
bool | HasMode (char cMode) const |
CString | GetOptions () const |
CString | GetModeArg (char cMode) const |
std::map< char, unsigned int > | GetPermCounts () const |
bool | IsOn () const |
const CString & | GetName () const |
const std::map< char, CString > & | GetModes () const |
const CString & | GetKey () const |
const CString & | GetTopic () const |
const CString & | GetTopicOwner () const |
unsigned long | GetTopicDate () const |
const CString & | GetDefaultModes () const |
const std::map< CString, CNick > & | GetNicks () const |
size_t | GetNickCount () const |
bool | AutoClearChanBuffer () const |
bool | IsDetached () const |
bool | InConfig () const |
unsigned long | GetCreationDate () const |
bool | IsDisabled () const |
unsigned int | GetJoinTries () const |
bool | HasBufferCountSet () const |
bool | HasAutoClearChanBufferSet () const |
Protected Attributes | |
bool | m_bDetached |
bool | m_bIsOn |
bool | m_bAutoClearChanBuffer |
bool | m_bInConfig |
bool | m_bDisabled |
bool | m_bHasBufferCountSet |
bool | m_bHasAutoClearChanBufferSet |
CString | m_sName |
CString | m_sKey |
CString | m_sTopic |
CString | m_sTopicOwner |
unsigned long | m_ulTopicDate |
unsigned long | m_ulCreationDate |
CIRCNetwork * | m_pNetwork |
CNick | m_Nick |
unsigned int | m_uJoinTries |
CString | m_sDefaultModes |
std::map< CString, CNick > | m_msNicks |
CBuffer | m_Buffer |
bool | m_bModeKnown |
std::map< char, CString > | m_mcsModes |
enum CChan::EModes |
enum CChan::EUserPerms |
CChan::CChan | ( | const CString & | sName, |
CIRCNetwork * | pNetwork, | ||
bool | bInConfig, | ||
CConfig * | pConfig = nullptr |
||
) |
CChan::~CChan | ( | ) |
|
delete |
References CBuffer::AddLine(), and m_Buffer.
|
inline |
References CBuffer::AddLine(), and m_Buffer.
bool CChan::AddMode | ( | char | cMode, |
const CString & | sArg | ||
) |
bool CChan::AddNick | ( | const CString & | sNick | ) |
int CChan::AddNicks | ( | const CString & | sNicks | ) |
|
inline |
e.g. '@' for chanop.
References CNick::AddPerm(), and m_Nick.
void CChan::AttachUser | ( | CClient * | pClient = nullptr | ) |
|
inline |
References m_bAutoClearChanBuffer.
|
inline |
References CBuffer::Clear(), and m_Buffer.
void CChan::ClearNicks | ( | ) |
void CChan::Clone | ( | CChan & | chan | ) |
void CChan::Cycle | ( | ) | const |
void CChan::DetachUser | ( | ) |
|
inline |
References m_bDisabled.
void CChan::Enable | ( | ) |
|
inline |
References CBuffer::GetLineCount(), and m_Buffer.
|
inline |
References m_ulCreationDate.
|
inline |
References m_sDefaultModes.
|
inline |
References m_uJoinTries.
CString CChan::GetModeArg | ( | char | cMode | ) | const |
CString CChan::GetModeForNames | ( | ) | const |
|
inline |
References m_mcsModes.
CString CChan::GetModeString | ( | ) | const |
|
inline |
References m_pNetwork.
|
inline |
References m_msNicks.
CString CChan::GetOptions | ( | ) | const |
std::map<char, unsigned int> CChan::GetPermCounts | ( | ) | const |
|
inline |
e.g. '@' for chanop.
References CNick::GetPermStr(), and m_Nick.
|
inline |
References m_ulTopicDate.
|
inline |
References m_sTopicOwner.
|
inline |
References m_bHasAutoClearChanBufferSet.
|
inline |
References m_bHasBufferCountSet.
bool CChan::HasMode | ( | char | cMode | ) | const |
|
inline |
e.g. '@' for chanop.
References CNick::HasPerm(), and m_Nick.
|
inline |
References m_uJoinTries.
|
inline |
References m_bInConfig.
void CChan::InheritAutoClearChanBuffer | ( | bool | b | ) |
|
inline |
References m_bHasBufferCountSet, m_Buffer, and CBuffer::SetLineCount().
|
inline |
References m_bDetached.
|
inline |
References m_bDisabled.
|
inline |
References m_bModeKnown.
|
inline |
References m_bIsOn.
void CChan::JoinUser | ( | const CString & | sKey = "" | ) |
void CChan::ModeChange | ( | const CString & | sModes, |
const VCString & | vsModeParams, | ||
const CNick * | OpNick = nullptr |
||
) |
Handle changing the modes on a channel.
sModes | The mode string (eg. +ovbs-pbo) |
vsModeParams | The parameters for the mode string |
bool CChan::RemMode | ( | char | cMode | ) |
bool CChan::RemNick | ( | const CString & | sNick | ) |
|
inline |
e.g. '@' for chanop.
References m_Nick, and CNick::RemPerm().
void CChan::Reset | ( | ) |
Referenced by SetIsOn().
void CChan::ResetAutoClearChanBuffer | ( | ) |
void CChan::ResetBufferCount | ( | ) |
|
inline |
References m_uJoinTries.
void CChan::SendBuffer | ( | CClient * | pClient | ) |
void CChan::SetAutoClearChanBuffer | ( | bool | b | ) |
|
inline |
References m_bHasBufferCountSet, m_Buffer, and CBuffer::SetLineCount().
|
inline |
References m_ulCreationDate.
|
inline |
References m_sDefaultModes.
|
inline |
References m_bDetached.
void CChan::SetInConfig | ( | bool | b | ) |
void CChan::SetKey | ( | const CString & | s | ) |
|
inline |
References m_bModeKnown.
void CChan::SetModes | ( | const CString & | s | ) |
Set the current modes for this channel.
sModes | The mode characters being changed |
vsModeParams | The parameters for the modes to be set |
|
inline |
References m_ulTopicDate.
|
inline |
References m_sTopicOwner.
CConfig CChan::ToConfig | ( | ) | const |
|
protected |
Referenced by AutoClearChanBuffer().
|
protected |
Referenced by IsDetached(), and SetDetached().
|
protected |
Referenced by Disable(), and IsDisabled().
|
protected |
Referenced by HasAutoClearChanBufferSet().
|
protected |
Referenced by HasBufferCountSet(), InheritBufferCount(), and SetBufferCount().
|
protected |
Referenced by InConfig().
|
protected |
Referenced by IsModeKnown(), and SetModeKnown().
|
protected |
Referenced by AddBuffer(), ClearBuffer(), GetBuffer(), GetBufferCount(), InheritBufferCount(), and SetBufferCount().
|
protected |
Referenced by GetModes().
Referenced by GetNickCount(), and GetNicks().
|
protected |
Referenced by AddPerm(), GetPermStr(), HasPerm(), and RemPerm().
|
protected |
Referenced by GetNetwork().
|
protected |
Referenced by GetDefaultModes(), and SetDefaultModes().
|
protected |
Referenced by GetTopic(), and SetTopic().
|
protected |
Referenced by GetTopicOwner(), and SetTopicOwner().
|
protected |
Referenced by GetJoinTries(), IncJoinTries(), and ResetJoinTries().
|
protected |
Referenced by GetCreationDate(), and SetCreationDate().
|
protected |
Referenced by GetTopicDate(), and SetTopicDate().