ZNC
trunk
|
#include <znc.h>
Public Types | |
enum | ConfigState { ECONFIG_NOTHING, ECONFIG_NEED_REHASH, ECONFIG_NEED_WRITE } |
typedef std::pair< unsigned long long, unsigned long long > | TrafficStatsPair |
typedef std::map< CString, TrafficStatsPair > | TrafficStatsMap |
Public Member Functions | |
CZNC () | |
~CZNC () | |
void | DeleteUsers () |
void | Loop () |
bool | WritePidFile (int iPid) |
bool | DeletePidFile () |
bool | WaitForChildLock () |
bool | IsHostAllowed (const CString &sHostMask) const |
bool | AllowConnectionFrom (const CString &sIP) const |
void | InitDirs (const CString &sArgvPath, const CString &sDataDir) |
bool | OnBoot () |
CString | ExpandConfigPath (const CString &sConfigFile, bool bAllowMkDir=true) |
bool | WriteNewConfig (const CString &sConfigFile) |
bool | WriteConfig () |
bool | ParseConfig (const CString &sConfig, CString &sError) |
bool | RehashConfig (CString &sError) |
void | BackupConfigOnce (const CString &sSuffix) |
CString | GetUptime () const |
void | ClearBindHosts () |
bool | AddBindHost (const CString &sHost) |
bool | RemBindHost (const CString &sHost) |
void | ClearTrustedProxies () |
bool | AddTrustedProxy (const CString &sHost) |
bool | RemTrustedProxy (const CString &sHost) |
void | Broadcast (const CString &sMessage, bool bAdminOnly=false, CUser *pSkipUser=NULL, CClient *pSkipClient=NULL) |
void | AddBytesRead (unsigned long long u) |
void | AddBytesWritten (unsigned long long u) |
unsigned long long | BytesRead () const |
unsigned long long | BytesWritten () const |
TrafficStatsMap | GetTrafficStats (TrafficStatsPair &Users, TrafficStatsPair &ZNC, TrafficStatsPair &Total) |
void | AuthUser (CSmartPtr< CAuthBase > AuthClass) |
void | SetConfigState (enum ConfigState e) |
void | SetSkinName (const CString &s) |
void | SetStatusPrefix (const CString &s) |
void | SetMaxBufferSize (unsigned int i) |
void | SetAnonIPLimit (unsigned int i) |
void | SetServerThrottle (unsigned int i) |
void | SetProtectWebSessions (bool b) |
void | SetConnectDelay (unsigned int i) |
enum ConfigState | GetConfigState () const |
CSockManager & | GetManager () |
const CSockManager & | GetManager () const |
CModules & | GetModules () |
size_t | FilterUncommonModules (std::set< CModInfo > &ssModules) |
CString | GetSkinName () const |
const CString & | GetStatusPrefix () const |
const CString & | GetCurPath () const |
const CString & | GetHomePath () const |
const CString & | GetZNCPath () const |
CString | GetConfPath (bool bAllowMkDir=true) const |
CString | GetUserPath () const |
CString | GetModPath () const |
CString | GetPemLocation () const |
const CString & | GetConfigFile () const |
bool | WritePemFile () |
const VCString & | GetBindHosts () const |
const VCString & | GetTrustedProxies () const |
const std::vector< CListener * > & | GetListeners () const |
time_t | TimeStarted () const |
unsigned int | GetMaxBufferSize () const |
unsigned int | GetAnonIPLimit () const |
unsigned int | GetServerThrottle () const |
unsigned int | GetConnectDelay () const |
bool | GetProtectWebSessions () const |
CUser * | FindUser (const CString &sUsername) |
CModule * | FindModule (const CString &sModName, const CString &sUsername) |
CModule * | FindModule (const CString &sModName, CUser *pUser) |
bool | UpdateModule (const CString &sModule) |
Reload a module everywhere. More... | |
bool | DeleteUser (const CString &sUsername) |
bool | AddUser (CUser *pUser, CString &sErrorRet) |
const std::map< CString, CUser * > & | GetUserMap () const |
CListener * | FindListener (u_short uPort, const CString &BindHost, EAddrType eAddr) |
bool | AddListener (CListener *) |
bool | AddListener (unsigned short uPort, const CString &sBindHost, const CString &sURIPrefix, bool bSSL, EAddrType eAddr, CListener::EAcceptType eAccept, CString &sError) |
bool | DelListener (CListener *) |
void | SetMotd (const CString &sMessage) |
void | AddMotd (const CString &sMessage) |
void | ClearMotd () |
const VCString & | GetMotd () const |
void | AddServerThrottle (CString sName) |
bool | GetServerThrottle (CString sName) |
void | AddNetworkToQueue (CIRCNetwork *pNetwork) |
std::list< CIRCNetwork * > & | GetConnectionQueue () |
void | EnableConnectQueue () |
void | DisableConnectQueue () |
void | PauseConnectQueue () |
void | ResumeConnectQueue () |
void | LeakConnectQueueTimer (CConnectQueueTimer *pTimer) |
Static Public Member Functions | |
static CString | GetVersion () |
static CString | GetTag (bool bIncludeVersion=true, bool bHTML=false) |
static CString | GetCompileOptionsString () |
static void | CreateInstance () |
static CZNC & | Get () |
static void | DestroyInstance () |
static void | DumpConfig (const CConfig *Config) |
Protected Attributes | |
time_t | m_TimeStarted |
enum ConfigState | m_eConfigState |
std::vector< CListener * > | m_vpListeners |
std::map< CString, CUser * > | m_msUsers |
std::map< CString, CUser * > | m_msDelUsers |
CSockManager | m_Manager |
CString | m_sCurPath |
CString | m_sZNCPath |
CString | m_sConfigFile |
CString | m_sSkinName |
CString | m_sStatusPrefix |
CString | m_sPidFile |
CString | m_sSSLCertFile |
VCString | m_vsBindHosts |
VCString | m_vsTrustedProxies |
VCString | m_vsMotd |
CFile * | m_pLockFile |
unsigned int | m_uiConnectDelay |
unsigned int | m_uiAnonIPLimit |
unsigned int | m_uiMaxBufferSize |
CModules * | m_pModules |
unsigned long long | m_uBytesRead |
unsigned long long | m_uBytesWritten |
std::list< CIRCNetwork * > | m_lpConnectQueue |
CConnectQueueTimer * | m_pConnectQueueTimer |
unsigned int | m_uiConnectPaused |
TCacheMap< CString > | m_sConnectThrottle |
bool | m_bProtectWebSessions |
typedef std::map<CString, TrafficStatsPair> CZNC::TrafficStatsMap |
typedef std::pair<unsigned long long, unsigned long long> CZNC::TrafficStatsPair |
enum CZNC::ConfigState |
CZNC::CZNC | ( | ) |
CZNC::~CZNC | ( | ) |
bool CZNC::AddBindHost | ( | const CString & | sHost | ) |
|
inline |
References m_uBytesRead.
|
inline |
References m_uBytesWritten.
bool CZNC::AddListener | ( | CListener * | ) |
bool CZNC::AddListener | ( | unsigned short | uPort, |
const CString & | sBindHost, | ||
const CString & | sURIPrefix, | ||
bool | bSSL, | ||
EAddrType | eAddr, | ||
CListener::EAcceptType | eAccept, | ||
CString & | sError | ||
) |
void CZNC::AddNetworkToQueue | ( | CIRCNetwork * | pNetwork | ) |
|
inline |
References TCacheMap< K, V >::AddItem(), and m_sConnectThrottle.
bool CZNC::AddTrustedProxy | ( | const CString & | sHost | ) |
bool CZNC::AllowConnectionFrom | ( | const CString & | sIP | ) | const |
void CZNC::BackupConfigOnce | ( | const CString & | sSuffix | ) |
void CZNC::Broadcast | ( | const CString & | sMessage, |
bool | bAdminOnly = false , |
||
CUser * | pSkipUser = NULL , |
||
CClient * | pSkipClient = NULL |
||
) |
|
inline |
References m_uBytesRead.
|
inline |
References m_uBytesWritten.
void CZNC::ClearBindHosts | ( | ) |
void CZNC::ClearTrustedProxies | ( | ) |
|
static |
bool CZNC::DeletePidFile | ( | ) |
bool CZNC::DeleteUser | ( | const CString & | sUsername | ) |
void CZNC::DeleteUsers | ( | ) |
bool CZNC::DelListener | ( | CListener * | ) |
|
static |
void CZNC::DisableConnectQueue | ( | ) |
|
static |
void CZNC::EnableConnectQueue | ( | ) |
size_t CZNC::FilterUncommonModules | ( | std::set< CModInfo > & | ssModules | ) |
|
static |
|
inline |
References m_uiAnonIPLimit.
|
inline |
References m_vsBindHosts.
|
static |
|
inline |
References m_sConfigFile.
|
inline |
References m_eConfigState.
CString CZNC::GetConfPath | ( | bool | bAllowMkDir = true | ) | const |
|
inline |
References m_uiConnectDelay.
|
inline |
References m_lpConnectQueue.
const CString& CZNC::GetCurPath | ( | ) | const |
const CString& CZNC::GetHomePath | ( | ) | const |
|
inline |
References m_vpListeners.
|
inline |
References m_Manager.
|
inline |
References m_Manager.
|
inline |
References m_uiMaxBufferSize.
CString CZNC::GetModPath | ( | ) | const |
|
inline |
References m_pModules.
CString CZNC::GetPemLocation | ( | ) | const |
|
inline |
References m_bProtectWebSessions.
|
inline |
References TCacheMap< K, V >::GetTTL(), and m_sConnectThrottle.
|
inline |
References TCacheMap< K, V >::GetItem(), and m_sConnectThrottle.
|
inline |
References m_sSkinName.
|
inline |
References m_sStatusPrefix.
|
static |
TrafficStatsMap CZNC::GetTrafficStats | ( | TrafficStatsPair & | Users, |
TrafficStatsPair & | ZNC, | ||
TrafficStatsPair & | Total | ||
) |
|
inline |
References m_vsTrustedProxies.
CString CZNC::GetUptime | ( | ) | const |
CString CZNC::GetUserPath | ( | ) | const |
|
static |
const CString& CZNC::GetZNCPath | ( | ) | const |
bool CZNC::IsHostAllowed | ( | const CString & | sHostMask | ) | const |
void CZNC::LeakConnectQueueTimer | ( | CConnectQueueTimer * | pTimer | ) |
void CZNC::Loop | ( | ) |
bool CZNC::OnBoot | ( | ) |
void CZNC::PauseConnectQueue | ( | ) |
bool CZNC::RehashConfig | ( | CString & | sError | ) |
bool CZNC::RemBindHost | ( | const CString & | sHost | ) |
bool CZNC::RemTrustedProxy | ( | const CString & | sHost | ) |
void CZNC::ResumeConnectQueue | ( | ) |
|
inline |
References m_uiAnonIPLimit.
|
inline |
References m_eConfigState.
void CZNC::SetConnectDelay | ( | unsigned int | i | ) |
|
inline |
References m_uiMaxBufferSize.
|
inline |
References AddMotd(), and ClearMotd().
|
inline |
References m_bProtectWebSessions.
|
inline |
References m_sConnectThrottle, and TCacheMap< K, V >::SetTTL().
|
inline |
References m_sSkinName.
|
inline |
References m_sStatusPrefix.
|
inline |
References m_TimeStarted.
bool CZNC::UpdateModule | ( | const CString & | sModule | ) |
Reload a module everywhere.
This method will unload a module globally, for a user and for each network. It will then reload them all again.
sModule | The name of the module to reload |
bool CZNC::WaitForChildLock | ( | ) |
bool CZNC::WriteConfig | ( | ) |
bool CZNC::WriteNewConfig | ( | const CString & | sConfigFile | ) |
bool CZNC::WritePemFile | ( | ) |
bool CZNC::WritePidFile | ( | int | iPid | ) |
|
protected |
Referenced by GetProtectWebSessions(), and SetProtectWebSessions().
|
protected |
Referenced by GetConfigState(), and SetConfigState().
|
protected |
Referenced by GetConnectionQueue().
|
protected |
Referenced by GetManager().
Referenced by GetUserMap().
|
protected |
|
protected |
|
protected |
Referenced by GetModules().
|
protected |
Referenced by GetConfigFile().
Referenced by AddServerThrottle(), GetServerThrottle(), and SetServerThrottle().
|
protected |
|
protected |
|
protected |
Referenced by GetSkinName(), and SetSkinName().
|
protected |
|
protected |
Referenced by GetStatusPrefix(), and SetStatusPrefix().
|
protected |
|
protected |
Referenced by TimeStarted().
|
protected |
Referenced by AddBytesRead(), and BytesRead().
|
protected |
Referenced by AddBytesWritten(), and BytesWritten().
|
protected |
Referenced by GetAnonIPLimit(), and SetAnonIPLimit().
|
protected |
Referenced by GetConnectDelay().
|
protected |
|
protected |
Referenced by GetMaxBufferSize(), and SetMaxBufferSize().
|
protected |
Referenced by GetListeners().
|
protected |
Referenced by GetBindHosts().
|
protected |
Referenced by AddMotd(), ClearMotd(), and GetMotd().
|
protected |
Referenced by GetTrustedProxies().