ZNC
trunk
|
#include <IRCNetwork.h>
Public Member Functions | |
CIRCNetwork (CUser *pUser, const CString &sName) | |
CIRCNetwork (CUser *pUser, const CIRCNetwork &Network) | |
~CIRCNetwork () | |
void | Clone (const CIRCNetwork &Network, bool bCloneName=true) |
CString | GetNetworkPath () |
void | DelServers () |
bool | ParseConfig (CConfig *pConfig, CString &sError, bool bUpgrade=false) |
CConfig | ToConfig () |
void | BounceAllClients () |
bool | IsUserAttached () const |
bool | IsUserOnline () const |
void | ClientConnected (CClient *pClient) |
void | ClientDisconnected (CClient *pClient) |
CUser * | GetUser () |
const CString & | GetName () const |
bool | IsNetworkAttached () const |
std::vector< CClient * > & | GetClients () |
void | SetUser (CUser *pUser) |
bool | SetName (const CString &sName) |
CModules & | GetModules () |
const CModules & | GetModules () const |
bool | PutUser (const CString &sLine, CClient *pClient=NULL, CClient *pSkipClient=NULL) |
bool | PutStatus (const CString &sLine, CClient *pClient=NULL, CClient *pSkipClient=NULL) |
bool | PutModule (const CString &sModule, const CString &sLine, CClient *pClient=NULL, CClient *pSkipClient=NULL) |
const std::vector< CChan * > & | GetChans () const |
CChan * | FindChan (CString sName) const |
std::vector< CChan * > | FindChans (const CString &sWild) const |
bool | AddChan (CChan *pChan) |
bool | AddChan (const CString &sName, bool bInConfig) |
bool | DelChan (const CString &sName) |
void | JoinChans () |
void | JoinChans (std::set< CChan * > &sChans) |
const CString & | GetChanPrefixes () const |
void | SetChanPrefixes (const CString &s) |
bool | IsChan (const CString &sChan) const |
const std::vector< CServer * > & | GetServers () const |
bool | HasServers () const |
CServer * | FindServer (const CString &sName) const |
bool | DelServer (const CString &sName, unsigned short uPort, const CString &sPass) |
bool | AddServer (const CString &sName) |
bool | AddServer (const CString &sName, unsigned short uPort, const CString &sPass="", bool bSSL=false) |
CServer * | GetNextServer () |
CServer * | GetCurrentServer () const |
void | SetIRCServer (const CString &s) |
bool | SetNextServer (const CServer *pServer) |
bool | IsLastServer () const |
void | SetIRCConnectEnabled (bool b) |
bool | GetIRCConnectEnabled () const |
CIRCSock * | GetIRCSock () |
const CIRCSock * | GetIRCSock () const |
const CString & | GetIRCServer () const |
const CNick & | GetIRCNick () const |
void | SetIRCNick (const CNick &n) |
CString | GetCurNick () const |
bool | IsIRCAway () const |
void | SetIRCAway (bool b) |
bool | Connect () |
bool | IsIRCConnected () const |
This method will return whether the user is connected and authenticated to an IRC server. More... | |
void | SetIRCSocket (CIRCSock *pIRCSock) |
void | IRCDisconnected () |
void | CheckIRCConnect () |
bool | PutIRC (const CString &sLine) |
void | AddRawBuffer (const CString &sFormat, const CString &sText="") |
void | UpdateRawBuffer (const CString &sMatch, const CString &sFormat, const CString &sText="") |
void | UpdateExactRawBuffer (const CString &sFormat, const CString &sText="") |
void | ClearRawBuffer () |
void | AddMotdBuffer (const CString &sFormat, const CString &sText="") |
void | UpdateMotdBuffer (const CString &sMatch, const CString &sFormat, const CString &sText="") |
void | ClearMotdBuffer () |
void | AddQueryBuffer (const CString &sFormat, const CString &sText="") |
void | UpdateQueryBuffer (const CString &sMatch, const CString &sFormat, const CString &sText="") |
void | ClearQueryBuffer () |
const CString & | GetNick (const bool bAllowDefault=true) const |
const CString & | GetAltNick (const bool bAllowDefault=true) const |
const CString & | GetIdent (const bool bAllowDefault=true) const |
const CString & | GetRealName () const |
const CString & | GetBindHost () const |
const CString & | GetEncoding () const |
void | SetNick (const CString &s) |
void | SetAltNick (const CString &s) |
void | SetIdent (const CString &s) |
void | SetRealName (const CString &s) |
void | SetBindHost (const CString &s) |
void | SetEncoding (const CString &s) |
double | GetFloodRate () const |
unsigned short int | GetFloodBurst () const |
void | SetFloodRate (double fFloodRate) |
void | SetFloodBurst (unsigned short int uFloodBurst) |
CString | ExpandString (const CString &sStr) const |
CString & | ExpandString (const CString &sStr, CString &sRet) const |
Static Public Member Functions | |
static bool | IsValidNetwork (const CString &sNetwork) |
Protected Attributes | |
CString | m_sName |
CUser * | m_pUser |
CString | m_sNick |
CString | m_sAltNick |
CString | m_sIdent |
CString | m_sRealName |
CString | m_sBindHost |
CString | m_sEncoding |
CModules * | m_pModules |
std::vector< CClient * > | m_vClients |
CIRCSock * | m_pIRCSock |
std::vector< CChan * > | m_vChans |
CString | m_sChanPrefixes |
bool | m_bIRCConnectEnabled |
CString | m_sIRCServer |
std::vector< CServer * > | m_vServers |
size_t | m_uServerIdx |
Index in m_vServers of our current server + 1. More... | |
CNick | m_IRCNick |
bool | m_bIRCAway |
double | m_fFloodRate |
Set to -1 to disable protection. More... | |
unsigned short int | m_uFloodBurst |
CBuffer | m_RawBuffer |
CBuffer | m_MotdBuffer |
CBuffer | m_QueryBuffer |
CIRCNetwork::CIRCNetwork | ( | CUser * | pUser, |
const CIRCNetwork & | Network | ||
) |
CIRCNetwork::~CIRCNetwork | ( | ) |
bool CIRCNetwork::AddChan | ( | CChan * | pChan | ) |
bool CIRCNetwork::AddChan | ( | const CString & | sName, |
bool | bInConfig | ||
) |
References CBuffer::AddLine(), and m_MotdBuffer.
References CBuffer::AddLine(), and m_QueryBuffer.
References CBuffer::AddLine(), and m_RawBuffer.
bool CIRCNetwork::AddServer | ( | const CString & | sName | ) |
bool CIRCNetwork::AddServer | ( | const CString & | sName, |
unsigned short | uPort, | ||
const CString & | sPass = "" , |
||
bool | bSSL = false |
||
) |
void CIRCNetwork::BounceAllClients | ( | ) |
void CIRCNetwork::CheckIRCConnect | ( | ) |
|
inline |
References CBuffer::Clear(), and m_MotdBuffer.
|
inline |
References CBuffer::Clear(), and m_QueryBuffer.
|
inline |
References CBuffer::Clear(), and m_RawBuffer.
void CIRCNetwork::ClientConnected | ( | CClient * | pClient | ) |
void CIRCNetwork::ClientDisconnected | ( | CClient * | pClient | ) |
void CIRCNetwork::Clone | ( | const CIRCNetwork & | Network, |
bool | bCloneName = true |
||
) |
bool CIRCNetwork::Connect | ( | ) |
bool CIRCNetwork::DelChan | ( | const CString & | sName | ) |
void CIRCNetwork::DelServers | ( | ) |
const CString& CIRCNetwork::GetAltNick | ( | const bool | bAllowDefault = true | ) | const |
const CString& CIRCNetwork::GetBindHost | ( | ) | const |
|
inline |
References m_sChanPrefixes.
const std::vector<CChan*>& CIRCNetwork::GetChans | ( | ) | const |
|
inline |
References m_vClients.
CString CIRCNetwork::GetCurNick | ( | ) | const |
CServer* CIRCNetwork::GetCurrentServer | ( | ) | const |
const CString& CIRCNetwork::GetEncoding | ( | ) | const |
|
inline |
References m_uFloodBurst.
|
inline |
References m_fFloodRate.
const CString& CIRCNetwork::GetIdent | ( | const bool | bAllowDefault = true | ) | const |
|
inline |
References m_bIRCConnectEnabled.
const CNick& CIRCNetwork::GetIRCNick | ( | ) | const |
const CString& CIRCNetwork::GetIRCServer | ( | ) | const |
|
inline |
References m_pIRCSock.
|
inline |
References m_pIRCSock.
|
inline |
References m_pModules.
|
inline |
References m_pModules.
const CString& CIRCNetwork::GetName | ( | ) | const |
CString CIRCNetwork::GetNetworkPath | ( | ) |
CServer* CIRCNetwork::GetNextServer | ( | ) |
const CString& CIRCNetwork::GetNick | ( | const bool | bAllowDefault = true | ) | const |
const CString& CIRCNetwork::GetRealName | ( | ) | const |
const std::vector<CServer*>& CIRCNetwork::GetServers | ( | ) | const |
CUser* CIRCNetwork::GetUser | ( | ) |
|
inline |
References m_vServers.
void CIRCNetwork::IRCDisconnected | ( | ) |
bool CIRCNetwork::IsChan | ( | const CString & | sChan | ) | const |
|
inline |
References m_bIRCAway.
bool CIRCNetwork::IsIRCConnected | ( | ) | const |
This method will return whether the user is connected and authenticated to an IRC server.
bool CIRCNetwork::IsLastServer | ( | ) | const |
|
inline |
References m_vClients.
|
inline |
References m_vClients.
bool CIRCNetwork::IsUserOnline | ( | ) | const |
|
static |
void CIRCNetwork::JoinChans | ( | ) |
void CIRCNetwork::JoinChans | ( | std::set< CChan * > & | sChans | ) |
bool CIRCNetwork::PutIRC | ( | const CString & | sLine | ) |
bool CIRCNetwork::PutModule | ( | const CString & | sModule, |
const CString & | sLine, | ||
CClient * | pClient = NULL , |
||
CClient * | pSkipClient = NULL |
||
) |
bool CIRCNetwork::PutStatus | ( | const CString & | sLine, |
CClient * | pClient = NULL , |
||
CClient * | pSkipClient = NULL |
||
) |
bool CIRCNetwork::PutUser | ( | const CString & | sLine, |
CClient * | pClient = NULL , |
||
CClient * | pSkipClient = NULL |
||
) |
void CIRCNetwork::SetAltNick | ( | const CString & | s | ) |
void CIRCNetwork::SetBindHost | ( | const CString & | s | ) |
|
inline |
References m_sChanPrefixes.
void CIRCNetwork::SetEncoding | ( | const CString & | s | ) |
|
inline |
References m_uFloodBurst.
|
inline |
References m_fFloodRate.
void CIRCNetwork::SetIdent | ( | const CString & | s | ) |
|
inline |
References m_bIRCAway.
void CIRCNetwork::SetIRCConnectEnabled | ( | bool | b | ) |
void CIRCNetwork::SetIRCNick | ( | const CNick & | n | ) |
void CIRCNetwork::SetIRCServer | ( | const CString & | s | ) |
void CIRCNetwork::SetIRCSocket | ( | CIRCSock * | pIRCSock | ) |
bool CIRCNetwork::SetName | ( | const CString & | sName | ) |
bool CIRCNetwork::SetNextServer | ( | const CServer * | pServer | ) |
void CIRCNetwork::SetNick | ( | const CString & | s | ) |
void CIRCNetwork::SetRealName | ( | const CString & | s | ) |
void CIRCNetwork::SetUser | ( | CUser * | pUser | ) |
CConfig CIRCNetwork::ToConfig | ( | ) |
|
inline |
References m_RawBuffer, and CBuffer::UpdateExactLine().
|
inline |
References m_MotdBuffer, and CBuffer::UpdateLine().
|
inline |
References m_QueryBuffer, and CBuffer::UpdateLine().
|
inline |
References m_RawBuffer, and CBuffer::UpdateLine().
|
protected |
Referenced by IsIRCAway(), and SetIRCAway().
|
protected |
Referenced by GetIRCConnectEnabled().
|
protected |
Set to -1 to disable protection.
Referenced by GetFloodRate(), and SetFloodRate().
|
protected |
|
protected |
Referenced by AddMotdBuffer(), ClearMotdBuffer(), and UpdateMotdBuffer().
|
protected |
Referenced by GetIRCSock().
|
protected |
Referenced by GetModules().
|
protected |
|
protected |
Referenced by AddQueryBuffer(), ClearQueryBuffer(), and UpdateQueryBuffer().
|
protected |
Referenced by AddRawBuffer(), ClearRawBuffer(), UpdateExactRawBuffer(), and UpdateRawBuffer().
|
protected |
|
protected |
|
protected |
Referenced by GetChanPrefixes(), and SetChanPrefixes().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetFloodBurst(), and SetFloodBurst().
|
protected |
Index in m_vServers of our current server + 1.
|
protected |
|
protected |
Referenced by GetClients(), IsNetworkAttached(), and IsUserAttached().
|
protected |
Referenced by HasServers().