|
ZNC trunk
|
#include <znc.h>
Inheritance diagram for CZNC:
Collaboration diagram for CZNC:Public Types | |
| enum | ConfigState { ECONFIG_NOTHING , ECONFIG_NEED_REHASH , ECONFIG_NEED_WRITE , ECONFIG_NEED_VERBOSE_WRITE , ECONFIG_DELAYED_WRITE , ECONFIG_NEED_QUIT } |
| typedef std::pair< unsigned long long, unsigned long long > | TrafficStatsPair |
| typedef std::map< CString, TrafficStatsPair > | TrafficStatsMap |
Public Member Functions | |
| CZNC () | |
| ~CZNC () | |
| CZNC (const CZNC &)=delete | |
| CZNC & | operator= (const CZNC &)=delete |
| 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) |
| const SCString & | GetClientCapBlacklist () const |
| const SCString & | GetServerCapBlacklist () const |
| void | Broadcast (const CString &sMessage, bool bAdminOnly=false, CUser *pSkipUser=nullptr, CClient *pSkipClient=nullptr) |
| 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) |
| TrafficStatsMap | GetNetworkTrafficStats (const CString &sUsername, TrafficStatsPair &Total) |
| void | AuthUser (std::shared_ptr< 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 | SetHideVersion (bool b) |
| void | SetAuthOnlyViaModule (bool b) |
| void | SetConnectDelay (unsigned int i) |
| void | SetSSLCiphers (const CString &sCiphers) |
| bool | SetSSLProtocols (const CString &sProtocols) |
| void | SetSSLCertFile (const CString &sFile) |
| void | SetConfigWriteDelay (unsigned int i) |
| enum ConfigState | GetConfigState () |
| CSockManager & | GetManager () |
| const CSockManager & | GetManager () const |
| CModules & | GetModules () |
| 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 |
| CString | GetKeyLocation () const |
| CString | GetDHParamLocation () 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 |
| bool | GetHideVersion () const |
| bool | GetAuthOnlyViaModule () const |
| CString | GetSSLCiphers () const |
| CString | GetSSLProtocols () const |
| Csock::EDisableProtocol | GetDisabledSSLProtocols () const |
| CString | GetSSLCertFile () const |
| unsigned int | GetConfigWriteDelay () 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. | |
| bool | DeleteUser (const CString &sUsername) |
| bool | AddUser (CUser *pUser, CString &sErrorRet, bool bStartup=false) |
| const std::map< CString, CUser * > & | GetUserMap () const |
| CListener * | FindListener (u_short uPort, const CString &BindHost, EAddrType eAddr) |
| CListener * | FindUnixListener (const CString &sPath) |
| bool | AddListener (CListener *) |
| bool | AddTCPListener (unsigned short uPort, const CString &sBindHost, const CString &sURIPrefix, bool bSSL, EAddrType eAddr, CListener::EAcceptType eAccept, CString &sError) |
| bool | AddUnixListener (const CString &sPath, const CString &sURIPrefix, bool bSSL, CListener::EAcceptType eAccept, const CString &sGroup, const CString &sMode, CString &sError) |
| bool | DelListener (CListener *) |
| bool | AddListener (unsigned short uPort, const CString &sBindHost, const CString &sURIPrefix, bool bSSL, EAddrType eAddr, CListener::EAcceptType eAccept, CString &sError) |
| 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 | ForceEncoding () |
| void | UnforceEncoding () |
| bool | IsForcingEncoding () const |
| CString | FixupEncoding (const CString &sEncoding) const |
| void | LeakConnectQueueTimer (CConnectQueueTimer *pTimer) |
| void | DisableConfigTimer () |
Static Public Member Functions | |
| static CString | GetVersion () |
| static CString | GetTag (bool bIncludeVersion=true, bool bHTML=false) |
| static CString | GetCompileOptionsString () |
| static VCString | GetAvailableSSLProtocols () |
| static void | CreateInstance () |
| static CZNC & | Get () |
| static void | DestroyInstance () |
| static void | DumpConfig (const CConfig *Config) |
| 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 | ( | ) |
|
delete |
|
inline |
|
inline |
References m_uBytesRead.
|
inline |
References m_uBytesWritten.
| bool CZNC::AddListener | ( | CListener * | ) |
|
inline |
References AddTCPListener().
| void CZNC::AddNetworkToQueue | ( | CIRCNetwork * | pNetwork | ) |
|
inline |
References TCacheMap< K, V >::AddItem(), and m_sConnectThrottle.
| bool CZNC::AddTCPListener | ( | unsigned short | uPort, |
| const CString & | sBindHost, | ||
| const CString & | sURIPrefix, | ||
| bool | bSSL, | ||
| EAddrType | eAddr, | ||
| CListener::EAcceptType | eAccept, | ||
| CString & | sError | ||
| ) |
Referenced by AddListener().
| bool CZNC::AddTrustedProxy | ( | const CString & | sHost | ) |
| bool CZNC::AddUnixListener | ( | const CString & | sPath, |
| const CString & | sURIPrefix, | ||
| bool | bSSL, | ||
| CListener::EAcceptType | eAccept, | ||
| const CString & | sGroup, | ||
| const CString & | sMode, | ||
| CString & | sError | ||
| ) |
| bool CZNC::AllowConnectionFrom | ( | const CString & | sIP | ) | const |
| void CZNC::AuthUser | ( | std::shared_ptr< CAuthBase > | AuthClass | ) |
| void CZNC::BackupConfigOnce | ( | const CString & | sSuffix | ) |
| void CZNC::Broadcast | ( | const CString & | sMessage, |
| bool | bAdminOnly = false, |
||
| CUser * | pSkipUser = nullptr, |
||
| CClient * | pSkipClient = nullptr |
||
| ) |
|
inline |
References m_uBytesRead.
|
inline |
References m_uBytesWritten.
|
inline |
| void CZNC::ClearTrustedProxies | ( | ) |
|
static |
| bool CZNC::DeletePidFile | ( | ) |
| bool CZNC::DeleteUser | ( | const CString & | sUsername | ) |
| void CZNC::DeleteUsers | ( | ) |
| bool CZNC::DelListener | ( | CListener * | ) |
|
static |
| void CZNC::DisableConfigTimer | ( | ) |
| void CZNC::DisableConnectQueue | ( | ) |
|
static |
| void CZNC::EnableConnectQueue | ( | ) |
| void CZNC::ForceEncoding | ( | ) |
|
static |
|
inline |
References m_uiAnonIPLimit.
|
inline |
References m_bAuthOnlyViaModule.
|
static |
|
inline |
References m_vsBindHosts.
|
inline |
References m_ssClientCapBlacklist.
|
static |
|
inline |
References m_sConfigFile.
|
inline |
References m_eConfigState, and m_mutexConfigState.
|
inline |
References m_uiConfigWriteDelay.
| CString CZNC::GetConfPath | ( | bool | bAllowMkDir = true | ) | const |
|
inline |
References m_uiConnectDelay.
|
inline |
References m_lpConnectQueue.
| const CString & CZNC::GetCurPath | ( | ) | const |
| CString CZNC::GetDHParamLocation | ( | ) | const |
|
inline |
References m_uDisabledSSLProtocols.
|
inline |
References m_bHideVersion.
| const CString & CZNC::GetHomePath | ( | ) | const |
| CString CZNC::GetKeyLocation | ( | ) | 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.
| TrafficStatsMap CZNC::GetNetworkTrafficStats | ( | const CString & | sUsername, |
| TrafficStatsPair & | Total | ||
| ) |
| CString CZNC::GetPemLocation | ( | ) | const |
|
inline |
References m_bProtectWebSessions.
|
inline |
References m_ssServerCapBlacklist.
|
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_sSSLCertFile.
|
inline |
References m_sSSLCiphers.
|
inline |
References m_sSSLProtocols.
|
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::IsForcingEncoding | ( | ) | 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 | ) |
|
inline |
| bool CZNC::RemTrustedProxy | ( | const CString & | sHost | ) |
| void CZNC::ResumeConnectQueue | ( | ) |
|
inline |
References m_uiAnonIPLimit.
|
inline |
References m_bAuthOnlyViaModule.
|
inline |
References m_eConfigState, and m_mutexConfigState.
|
inline |
References m_uiConfigWriteDelay.
| void CZNC::SetConnectDelay | ( | unsigned int | i | ) |
|
inline |
References m_bHideVersion.
|
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_sSSLCertFile.
|
inline |
References m_sSSLCiphers.
| bool CZNC::SetSSLProtocols | ( | const CString & | sProtocols | ) |
|
inline |
References m_sStatusPrefix.
|
inline |
References m_TimeStarted.
| void CZNC::UnforceEncoding | ( | ) |
| 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 GetAuthOnlyViaModule(), and SetAuthOnlyViaModule().
|
protected |
Referenced by GetHideVersion(), and SetHideVersion().
|
protected |
Referenced by GetProtectWebSessions(), and SetProtectWebSessions().
|
protected |
Referenced by GetConfigState(), and SetConfigState().
|
protected |
Referenced by GetConnectionQueue().
|
protected |
Referenced by GetManager(), and GetManager().
Referenced by GetUserMap().
|
protected |
Referenced by GetConfigState(), and SetConfigState().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetModules().
|
protected |
Referenced by GetConfigFile().
Referenced by AddServerThrottle(), GetServerThrottle(), GetServerThrottle(), and SetServerThrottle().
|
protected |
|
protected |
|
protected |
Referenced by GetClientCapBlacklist().
|
protected |
Referenced by GetSkinName(), and SetSkinName().
|
protected |
Referenced by GetServerCapBlacklist().
|
protected |
Referenced by GetSSLCertFile(), and SetSSLCertFile().
|
protected |
Referenced by GetSSLCiphers(), and SetSSLCiphers().
|
protected |
|
protected |
|
protected |
Referenced by GetSSLProtocols().
|
protected |
Referenced by GetStatusPrefix(), and SetStatusPrefix().
|
protected |
|
protected |
Referenced by TimeStarted().
|
protected |
|
protected |
Referenced by AddBytesRead(), and BytesRead().
|
protected |
Referenced by AddBytesWritten(), and BytesWritten().
|
protected |
Referenced by GetDisabledSSLProtocols().
|
protected |
Referenced by GetAnonIPLimit(), and SetAnonIPLimit().
|
protected |
Referenced by GetConfigWriteDelay(), and SetConfigWriteDelay().
|
protected |
Referenced by GetConnectDelay().
|
protected |
|
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().