20 #include <znc/zncconfig.h>
33 class CConnectQueueTimer;
34 class CConfigWriteTimer;
67 bool bAllowMkDir =
true);
87 CUser* pSkipUser =
nullptr,
CClient* pSkipClient =
nullptr);
108 void AuthUser(std::shared_ptr<CAuthBase> AuthClass);
217 if (!sMessage.empty()) {
256 static CString FormatBindError();
258 CFile* InitPidFile();
264 void UnloadRemovedModules(
const MCString& msModules);
266 bool HandleUserDeletion();
EAddrType
Definition: Socket.h:77
std::vector< CString > VCString
Definition: ZNCString.h:38
Definition: Translation.h:103
Definition: FileUtils.h:30
Definition: IRCNetwork.h:40
Definition: Listener.h:27
EAcceptType
Definition: Listener.h:29
The base class for your own ZNC modules.
Definition: Modules.h:420
Definition: Modules.h:1464
String class that is used inside ZNC.
Definition: ZNCString.h:68
bool AddListener(unsigned short uPort, const CString &sBindHost, const CString &sURIPrefix, bool bSSL, EAddrType eAddr, CListener::EAcceptType eAccept, CString &sError)
unsigned int m_uiForceEncoding
Definition: znc.h:308
const VCString & GetBindHosts() const
Definition: znc.h:156
void SetSkinName(const CString &s)
Definition: znc.h:115
bool m_bProtectWebSessions
Definition: znc.h:310
CTranslationDomainRefHolder m_Translation
Definition: znc.h:313
void SetAuthOnlyViaModule(bool b)
Definition: znc.h:126
unsigned int m_uiConnectPaused
Definition: znc.h:307
unsigned int m_uDisabledSSLProtocols
Definition: znc.h:301
void ClearMotd()
Definition: znc.h:221
CString GetSSLProtocols() const
Definition: znc.h:172
CString m_sSkinName
Definition: znc.h:286
void Broadcast(const CString &sMessage, bool bAdminOnly=false, CUser *pSkipUser=nullptr, CClient *pSkipClient=nullptr)
const CString & GetHomePath() const
TrafficStatsMap GetNetworkTrafficStats(const CString &sUsername, TrafficStatsPair &Total)
void SetAnonIPLimit(unsigned int i)
Definition: znc.h:120
CString GetKeyLocation() const
unsigned long long BytesWritten() const
Definition: znc.h:91
std::vector< CListener * > m_vpListeners
Definition: znc.h:277
CString m_sStatusPrefix
Definition: znc.h:287
void AddServerThrottle(CString sName)
Definition: znc.h:225
CString GetSSLCertFile() const
Definition: znc.h:176
void SetProtectWebSessions(bool b)
Definition: znc.h:124
CString m_sZNCPath
Definition: znc.h:283
void AddNetworkToQueue(CIRCNetwork *pNetwork)
const CString & GetZNCPath() const
void ResumeConnectQueue()
TrafficStatsMap GetTrafficStats(TrafficStatsPair &Users, TrafficStatsPair &ZNC, TrafficStatsPair &Total)
void LeakConnectQueueTimer(CConnectQueueTimer *pTimer)
CString GetSkinName() const
Definition: znc.h:142
CZNC & operator=(const CZNC &)=delete
unsigned int m_uiAnonIPLimit
Definition: znc.h:299
CSockManager & GetManager()
Definition: znc.h:139
void AuthUser(std::shared_ptr< CAuthBase > AuthClass)
enum ConfigState GetConfigState()
Definition: znc.h:135
CSockManager m_Manager
Definition: znc.h:280
bool AllowConnectionFrom(const CString &sIP) const
CString FixupEncoding(const CString &sEncoding) const
CString GetSSLCiphers() const
Definition: znc.h:171
CConnectQueueTimer * m_pConnectQueueTimer
Definition: znc.h:306
unsigned int m_uiMaxBufferSize
Definition: znc.h:300
bool AddListener(CListener *)
static CString GetCompileOptionsString()
void SetServerThrottle(unsigned int i)
Definition: znc.h:121
TCacheMap< CString > m_sConnectThrottle
Definition: znc.h:309
CModule * FindModule(const CString &sModName, const CString &sUsername)
bool WritePidFile(int iPid)
bool ParseConfig(const CString &sConfig, CString &sError)
void SetSSLCiphers(const CString &sCiphers)
Definition: znc.h:128
time_t m_TimeStarted
Definition: znc.h:272
unsigned int m_uiConfigWriteDelay
Definition: znc.h:314
CString GetModPath() const
unsigned int GetServerThrottle() const
Definition: znc.h:164
unsigned int m_uiConnectDelay
Definition: znc.h:298
const std::vector< CListener * > & GetListeners() const
Definition: znc.h:158
static CString GetTag(bool bIncludeVersion=true, bool bHTML=false)
bool GetAuthOnlyViaModule() const
Definition: znc.h:170
std::map< CString, TrafficStatsPair > TrafficStatsMap
Definition: znc.h:95
bool RehashConfig(CString &sError)
bool AddTrustedProxy(const CString &sHost)
void AddMotd(const CString &sMessage)
Definition: znc.h:216
unsigned int GetMaxBufferSize() const
Definition: znc.h:162
bool m_bHideVersion
Definition: znc.h:311
time_t TimeStarted() const
Definition: znc.h:161
bool AddBindHost(const CString &sHost)
Definition: znc.h:80
CString m_sSSLProtocols
Definition: znc.h:293
void SetConnectDelay(unsigned int i)
void DisableConnectQueue()
bool AddUser(CUser *pUser, CString &sErrorRet, bool bStartup=false)
unsigned int GetConfigWriteDelay() const
Definition: znc.h:178
const std::map< CString, CUser * > & GetUserMap() const
Definition: znc.h:200
CString m_sSSLCiphers
Definition: znc.h:292
void SetConfigWriteDelay(unsigned int i)
Definition: znc.h:131
bool RemTrustedProxy(const CString &sHost)
void ClearBindHosts()
Definition: znc.h:78
VCString m_vsMotd
Definition: znc.h:296
std::mutex m_mutexConfigState
Definition: znc.h:275
CFile * m_pLockFile
Definition: znc.h:297
CZNC(const CZNC &)=delete
VCString m_vsTrustedProxies
Definition: znc.h:295
unsigned int GetConnectDelay() const
Definition: znc.h:167
CString GetUptime() const
void SetStatusPrefix(const CString &s)
Definition: znc.h:116
std::list< CIRCNetwork * > & GetConnectionQueue()
Definition: znc.h:234
CString m_sSSLDHParamFile
Definition: znc.h:291
VCString m_vsBindHosts
Definition: znc.h:294
ConfigState
Definition: znc.h:46
@ ECONFIG_NEED_QUIT
Definition: znc.h:52
@ ECONFIG_NOTHING
Definition: znc.h:47
@ ECONFIG_NEED_REHASH
Definition: znc.h:48
@ ECONFIG_NEED_VERBOSE_WRITE
Definition: znc.h:50
@ ECONFIG_NEED_WRITE
Definition: znc.h:49
@ ECONFIG_DELAYED_WRITE
Definition: znc.h:51
std::pair< unsigned long long, unsigned long long > TrafficStatsPair
Definition: znc.h:94
bool GetProtectWebSessions() const
Definition: znc.h:168
CString GetDHParamLocation() const
void SetSSLCertFile(const CString &sFile)
Definition: znc.h:130
bool DelListener(CListener *)
CModules & GetModules()
Definition: znc.h:141
static void CreateInstance()
void InitDirs(const CString &sArgvPath, const CString &sDataDir)
static CString GetVersion()
static void DumpConfig(const CConfig *Config)
CString GetConfPath(bool bAllowMkDir=true) const
const CString & GetStatusPrefix() const
Definition: znc.h:143
const VCString & GetMotd() const
Definition: znc.h:222
void EnableConnectQueue()
std::map< CString, CUser * > m_msUsers
Definition: znc.h:278
const CString & GetCurPath() const
void AddBytesRead(unsigned long long u)
Definition: znc.h:88
Csock::EDisableProtocol GetDisabledSSLProtocols() const
Definition: znc.h:173
void SetMaxBufferSize(unsigned int i)
Definition: znc.h:119
CModules * m_pModules
Definition: znc.h:302
unsigned long long m_uBytesRead
Definition: znc.h:303
bool WriteNewConfig(const CString &sConfigFile)
bool DeleteUser(const CString &sUsername)
CString m_sSSLCertFile
Definition: znc.h:289
CString m_sSSLKeyFile
Definition: znc.h:290
CListener * FindListener(u_short uPort, const CString &BindHost, EAddrType eAddr)
std::map< CString, CUser * > m_msDelUsers
Definition: znc.h:279
void DisableConfigTimer()
CString GetPemLocation() const
CString m_sConfigFile
Definition: znc.h:285
CString m_sCurPath
Definition: znc.h:282
bool RemBindHost(const CString &sHost)
Definition: znc.h:82
bool GetServerThrottle(CString sName)
Definition: znc.h:228
CUser * FindUser(const CString &sUsername)
static void DestroyInstance()
std::list< CIRCNetwork * > m_lpConnectQueue
Definition: znc.h:305
bool GetHideVersion() const
Definition: znc.h:169
void SetHideVersion(bool b)
Definition: znc.h:125
CConfigWriteTimer * m_pConfigTimer
Definition: znc.h:315
bool SetSSLProtocols(const CString &sProtocols)
void AddBytesWritten(unsigned long long u)
Definition: znc.h:89
unsigned long long BytesRead() const
Definition: znc.h:90
bool IsHostAllowed(const CString &sHostMask) const
CModule * FindModule(const CString &sModName, CUser *pUser)
bool m_bAuthOnlyViaModule
Definition: znc.h:312
void BackupConfigOnce(const CString &sSuffix)
CString m_sPidFile
Definition: znc.h:288
void SetMotd(const CString &sMessage)
Definition: znc.h:212
bool IsForcingEncoding() const
void SetConfigState(enum ConfigState e)
Definition: znc.h:111
const VCString & GetTrustedProxies() const
Definition: znc.h:157
const CSockManager & GetManager() const
Definition: znc.h:140
static VCString GetAvailableSSLProtocols()
bool UpdateModule(const CString &sModule)
Reload a module everywhere.
CString ExpandConfigPath(const CString &sConfigFile, bool bAllowMkDir=true)
CString GetUserPath() const
const CString & GetConfigFile() const
Definition: znc.h:153
unsigned int GetAnonIPLimit() const
Definition: znc.h:163
enum ConfigState m_eConfigState
Definition: znc.h:274
void ClearTrustedProxies()
unsigned long long m_uBytesWritten
Definition: znc.h:304
EDisableProtocol
Definition: Csocket.h:627
A dictionary for strings.
Definition: ZNCString.h:595
void AddItem(const K &Item)
This function adds an item to the cache using the default time-to-live value.
Definition: Utils.h:301
unsigned int GetTTL() const
Definition: Utils.h:399
void SetTTL(unsigned int u)
Definition: Utils.h:396
V * GetItem(const K &Item)
Performs a Cleanup() and returns a pointer to the object, or nullptr.
Definition: Utils.h:349
Definition: Translation.h:62