ZNC  trunk
znc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2021 ZNC, see the NOTICE file for details.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ZNC_H
18 #define ZNC_H
19 
20 #include <znc/zncconfig.h>
21 #include <znc/Client.h>
22 #include <znc/Modules.h>
23 #include <znc/Socket.h>
24 #include <znc/Listener.h>
25 #include <znc/Translation.h>
26 #include <mutex>
27 #include <map>
28 #include <list>
29 
30 class CListener;
31 class CUser;
32 class CIRCNetwork;
33 class CConnectQueueTimer;
34 class CConfigWriteTimer;
35 class CConfig;
36 class CFile;
37 
38 class CZNC : private CCoreTranslationMixin {
39  public:
40  CZNC();
41  ~CZNC();
42 
43  CZNC(const CZNC&) = delete;
44  CZNC& operator=(const CZNC&) = delete;
45 
46  enum ConfigState {
52  ECONFIG_NEED_QUIT, // Not really config...
53  };
54 
55  void DeleteUsers();
56  void Loop();
57  bool WritePidFile(int iPid);
58  bool DeletePidFile();
59  bool WaitForChildLock();
60  bool IsHostAllowed(const CString& sHostMask) const;
61  // This returns false if there are too many anonymous connections from this
62  // ip
63  bool AllowConnectionFrom(const CString& sIP) const;
64  void InitDirs(const CString& sArgvPath, const CString& sDataDir);
65  bool OnBoot();
66  CString ExpandConfigPath(const CString& sConfigFile,
67  bool bAllowMkDir = true);
68  bool WriteNewConfig(const CString& sConfigFile);
69  bool WriteConfig();
70  bool ParseConfig(const CString& sConfig, CString& sError);
71  bool RehashConfig(CString& sError);
72  void BackupConfigOnce(const CString& sSuffix);
73  static CString GetVersion();
74  static CString GetTag(bool bIncludeVersion = true, bool bHTML = false);
76  CString GetUptime() const;
78  void ClearBindHosts() {}
80  bool AddBindHost(const CString& sHost) { return false; }
82  bool RemBindHost(const CString& sHost) { return false; }
83  void ClearTrustedProxies();
84  bool AddTrustedProxy(const CString& sHost);
85  bool RemTrustedProxy(const CString& sHost);
86  void Broadcast(const CString& sMessage, bool bAdminOnly = false,
87  CUser* pSkipUser = nullptr, CClient* pSkipClient = nullptr);
88  void AddBytesRead(unsigned long long u) { m_uBytesRead += u; }
89  void AddBytesWritten(unsigned long long u) { m_uBytesWritten += u; }
90  unsigned long long BytesRead() const { return m_uBytesRead; }
91  unsigned long long BytesWritten() const { return m_uBytesWritten; }
92 
93  // Traffic fun
94  typedef std::pair<unsigned long long, unsigned long long> TrafficStatsPair;
95  typedef std::map<CString, TrafficStatsPair> TrafficStatsMap;
96  // Returns a map which maps user names to <traffic in, traffic out>
97  // while also providing the traffic of all users together, traffic which
98  // couldn't be accounted to any particular user and the total traffic
99  // generated through ZNC.
101  TrafficStatsPair& ZNC,
102  TrafficStatsPair& Total);
104  TrafficStatsPair& Total);
105 
106  // Authenticate a user.
107  // The result is passed back via callbacks to CAuthBase.
108  void AuthUser(std::shared_ptr<CAuthBase> AuthClass);
109 
110  // Setters
112  std::lock_guard<std::mutex> guard(m_mutexConfigState);
113  m_eConfigState = e;
114  }
115  void SetSkinName(const CString& s) { m_sSkinName = s; }
116  void SetStatusPrefix(const CString& s) {
117  m_sStatusPrefix = (s.empty()) ? "*" : s;
118  }
119  void SetMaxBufferSize(unsigned int i) { m_uiMaxBufferSize = i; }
120  void SetAnonIPLimit(unsigned int i) { m_uiAnonIPLimit = i; }
121  void SetServerThrottle(unsigned int i) {
122  m_sConnectThrottle.SetTTL(i * 1000);
123  }
125  void SetHideVersion(bool b) { m_bHideVersion = b; }
127  void SetConnectDelay(unsigned int i);
128  void SetSSLCiphers(const CString& sCiphers) { m_sSSLCiphers = sCiphers; }
129  bool SetSSLProtocols(const CString& sProtocols);
130  void SetSSLCertFile(const CString& sFile) { m_sSSLCertFile = sFile; }
131  void SetConfigWriteDelay(unsigned int i) { m_uiConfigWriteDelay = i; }
132  // !Setters
133 
134  // Getters
136  std::lock_guard<std::mutex> guard(m_mutexConfigState);
137  return m_eConfigState;
138  }
140  const CSockManager& GetManager() const { return m_Manager; }
142  CString GetSkinName() const { return m_sSkinName; }
143  const CString& GetStatusPrefix() const { return m_sStatusPrefix; }
144  const CString& GetCurPath() const;
145  const CString& GetHomePath() const;
146  const CString& GetZNCPath() const;
147  CString GetConfPath(bool bAllowMkDir = true) const;
148  CString GetUserPath() const;
149  CString GetModPath() const;
150  CString GetPemLocation() const;
151  CString GetKeyLocation() const;
152  CString GetDHParamLocation() const;
153  const CString& GetConfigFile() const { return m_sConfigFile; }
154  bool WritePemFile();
156  const VCString& GetBindHosts() const { return m_vsBindHosts; }
157  const VCString& GetTrustedProxies() const { return m_vsTrustedProxies; }
158  const std::vector<CListener*>& GetListeners() const {
159  return m_vpListeners;
160  }
161  time_t TimeStarted() const { return m_TimeStarted; }
162  unsigned int GetMaxBufferSize() const { return m_uiMaxBufferSize; }
163  unsigned int GetAnonIPLimit() const { return m_uiAnonIPLimit; }
164  unsigned int GetServerThrottle() const {
165  return m_sConnectThrottle.GetTTL() / 1000;
166  }
167  unsigned int GetConnectDelay() const { return m_uiConnectDelay; }
169  bool GetHideVersion() const { return m_bHideVersion; }
171  CString GetSSLCiphers() const { return m_sSSLCiphers; }
175  }
178  unsigned int GetConfigWriteDelay() const { return m_uiConfigWriteDelay; }
179  // !Getters
180 
181  // Static allocator
182  static void CreateInstance();
183  static CZNC& Get();
184  static void DestroyInstance();
185  CUser* FindUser(const CString& sUsername);
186  CModule* FindModule(const CString& sModName, const CString& sUsername);
187  CModule* FindModule(const CString& sModName, CUser* pUser);
188 
196  bool UpdateModule(const CString& sModule);
197 
198  bool DeleteUser(const CString& sUsername);
199  bool AddUser(CUser* pUser, CString& sErrorRet, bool bStartup = false);
200  const std::map<CString, CUser*>& GetUserMap() const { return (m_msUsers); }
201 
202  // Listener yummy
203  CListener* FindListener(u_short uPort, const CString& BindHost,
204  EAddrType eAddr);
205  bool AddListener(CListener*);
206  bool AddListener(unsigned short uPort, const CString& sBindHost,
207  const CString& sURIPrefix, bool bSSL, EAddrType eAddr,
208  CListener::EAcceptType eAccept, CString& sError);
209  bool DelListener(CListener*);
210 
211  // Message of the Day
212  void SetMotd(const CString& sMessage) {
213  ClearMotd();
214  AddMotd(sMessage);
215  }
216  void AddMotd(const CString& sMessage) {
217  if (!sMessage.empty()) {
218  m_vsMotd.push_back(sMessage);
219  }
220  }
221  void ClearMotd() { m_vsMotd.clear(); }
222  const VCString& GetMotd() const { return m_vsMotd; }
223  // !MOTD
224 
226  m_sConnectThrottle.AddItem(sName, true);
227  }
229  bool* b = m_sConnectThrottle.GetItem(sName);
230  return (b && *b);
231  }
232 
233  void AddNetworkToQueue(CIRCNetwork* pNetwork);
234  std::list<CIRCNetwork*>& GetConnectionQueue() { return m_lpConnectQueue; }
235 
236  // This creates a CConnectQueueTimer if we haven't got one yet
237  void EnableConnectQueue();
238  void DisableConnectQueue();
239 
240  void PauseConnectQueue();
241  void ResumeConnectQueue();
242 
243  void ForceEncoding();
244  void UnforceEncoding();
245  bool IsForcingEncoding() const;
246  CString FixupEncoding(const CString& sEncoding) const;
247 
248  // Never call this unless you are CConnectQueueTimer::~CConnectQueueTimer()
249  void LeakConnectQueueTimer(CConnectQueueTimer* pTimer);
250 
251  void DisableConfigTimer();
252 
253  static void DumpConfig(const CConfig* Config);
254 
255  private:
256  static CString FormatBindError();
257 
258  CFile* InitPidFile();
259 
260  bool ReadConfig(CConfig& config, CString& sError);
261  bool LoadGlobal(CConfig& config, CString& sError);
262  bool LoadUsers(CConfig& config, CString& sError);
263  bool LoadListeners(CConfig& config, CString& sError);
264  void UnloadRemovedModules(const MCString& msModules);
265 
266  bool HandleUserDeletion();
267  CString MakeConfigHeader();
268  bool AddListener(const CString& sLine, CString& sError);
269  bool AddListener(CConfig* pConfig, CString& sError);
270 
271  protected:
273 
275  std::mutex m_mutexConfigState;
276 
277  std::vector<CListener*> m_vpListeners;
278  std::map<CString, CUser*> m_msUsers;
279  std::map<CString, CUser*> m_msDelUsers;
281 
284 
294  VCString m_vsBindHosts; // TODO: remove (deprecated in 1.7.0)
298  unsigned int m_uiConnectDelay;
299  unsigned int m_uiAnonIPLimit;
300  unsigned int m_uiMaxBufferSize;
303  unsigned long long m_uBytesRead;
304  unsigned long long m_uBytesWritten;
305  std::list<CIRCNetwork*> m_lpConnectQueue;
306  CConnectQueueTimer* m_pConnectQueueTimer;
307  unsigned int m_uiConnectPaused;
308  unsigned int m_uiForceEncoding;
314  unsigned int m_uiConfigWriteDelay;
315  CConfigWriteTimer* m_pConfigTimer;
316 };
317 
318 #endif // !ZNC_H
CZNC::BytesWritten
unsigned long long BytesWritten() const
Definition: znc.h:91
Client.h
CZNC::ParseConfig
bool ParseConfig(const CString &sConfig, CString &sError)
CZNC::WritePemFile
bool WritePemFile()
CZNC::AddBindHost
bool AddBindHost(const CString &sHost)
Definition: znc.h:80
CZNC::UnforceEncoding
void UnforceEncoding()
CZNC::m_bHideVersion
bool m_bHideVersion
Definition: znc.h:311
CZNC::GetStatusPrefix
const CString & GetStatusPrefix() const
Definition: znc.h:143
CZNC::UpdateModule
bool UpdateModule(const CString &sModule)
Reload a module everywhere.
CZNC::m_vpListeners
std::vector< CListener * > m_vpListeners
Definition: znc.h:277
CZNC::ClearBindHosts
void ClearBindHosts()
Definition: znc.h:78
CZNC::GetAuthOnlyViaModule
bool GetAuthOnlyViaModule() const
Definition: znc.h:170
CZNC::ECONFIG_NEED_REHASH
@ ECONFIG_NEED_REHASH
Definition: znc.h:48
CZNC::DisableConnectQueue
void DisableConnectQueue()
CZNC::GetTag
static CString GetTag(bool bIncludeVersion=true, bool bHTML=false)
CClient
Definition: Client.h:99
CZNC::ECONFIG_NEED_WRITE
@ ECONFIG_NEED_WRITE
Definition: znc.h:49
CZNC::SetServerThrottle
void SetServerThrottle(unsigned int i)
Definition: znc.h:121
CZNC::m_sSkinName
CString m_sSkinName
Definition: znc.h:286
CZNC::m_TimeStarted
time_t m_TimeStarted
Definition: znc.h:272
CZNC::WaitForChildLock
bool WaitForChildLock()
Modules.h
CZNC::m_sSSLKeyFile
CString m_sSSLKeyFile
Definition: znc.h:290
CZNC::m_pConnectQueueTimer
CConnectQueueTimer * m_pConnectQueueTimer
Definition: znc.h:306
CZNC::m_uiConfigWriteDelay
unsigned int m_uiConfigWriteDelay
Definition: znc.h:314
CZNC::ECONFIG_DELAYED_WRITE
@ ECONFIG_DELAYED_WRITE
Definition: znc.h:51
CZNC::ResumeConnectQueue
void ResumeConnectQueue()
CZNC::GetAnonIPLimit
unsigned int GetAnonIPLimit() const
Definition: znc.h:163
CZNC::GetConfigState
enum ConfigState GetConfigState()
Definition: znc.h:135
CZNC::WriteNewConfig
bool WriteNewConfig(const CString &sConfigFile)
CZNC::AddTrustedProxy
bool AddTrustedProxy(const CString &sHost)
CZNC::GetConnectDelay
unsigned int GetConnectDelay() const
Definition: znc.h:167
CZNC::GetManager
CSockManager & GetManager()
Definition: znc.h:139
MCString
A dictionary for strings.
Definition: ZNCString.h:595
CZNC::~CZNC
~CZNC()
CZNC::GetCurPath
const CString & GetCurPath() const
CZNC::DeletePidFile
bool DeletePidFile()
CZNC::RemBindHost
bool RemBindHost(const CString &sHost)
Definition: znc.h:82
CZNC::AddMotd
void AddMotd(const CString &sMessage)
Definition: znc.h:216
CZNC::GetZNCPath
const CString & GetZNCPath() const
CZNC::GetBindHosts
const VCString & GetBindHosts() const
Definition: znc.h:156
CZNC::Loop
void Loop()
CZNC::GetUserPath
CString GetUserPath() const
CSockManager
Definition: Socket.h:79
CZNC::InitDirs
void InitDirs(const CString &sArgvPath, const CString &sDataDir)
CZNC::FixupEncoding
CString FixupEncoding(const CString &sEncoding) const
CZNC::SetSSLProtocols
bool SetSSLProtocols(const CString &sProtocols)
CZNC::CZNC
CZNC()
CZNC::FindUser
CUser * FindUser(const CString &sUsername)
CZNC::m_sSSLCertFile
CString m_sSSLCertFile
Definition: znc.h:289
CZNC::EnableConnectQueue
void EnableConnectQueue()
CZNC::m_pConfigTimer
CConfigWriteTimer * m_pConfigTimer
Definition: znc.h:315
Listener.h
CZNC::m_uiConnectPaused
unsigned int m_uiConnectPaused
Definition: znc.h:307
CZNC::GetSkinName
CString GetSkinName() const
Definition: znc.h:142
CZNC::AddNetworkToQueue
void AddNetworkToQueue(CIRCNetwork *pNetwork)
CZNC::m_vsBindHosts
VCString m_vsBindHosts
Definition: znc.h:294
TCacheMap::GetTTL
unsigned int GetTTL() const
Definition: Utils.h:398
CZNC::m_Translation
CTranslationDomainRefHolder m_Translation
Definition: znc.h:313
CZNC::m_msDelUsers
std::map< CString, CUser * > m_msDelUsers
Definition: znc.h:279
CZNC::DestroyInstance
static void DestroyInstance()
CZNC::CreateInstance
static void CreateInstance()
CZNC::IsForcingEncoding
bool IsForcingEncoding() const
CZNC::m_sZNCPath
CString m_sZNCPath
Definition: znc.h:283
TCacheMap::GetItem
V * GetItem(const K &Item)
Performs a Cleanup() and returns a pointer to the object, or nullptr.
Definition: Utils.h:348
CZNC::GetMotd
const VCString & GetMotd() const
Definition: znc.h:222
CZNC::m_sCurPath
CString m_sCurPath
Definition: znc.h:282
CZNC::m_pModules
CModules * m_pModules
Definition: znc.h:302
CString
String class that is used inside ZNC.
Definition: ZNCString.h:68
CZNC::GetConfigWriteDelay
unsigned int GetConfigWriteDelay() const
Definition: znc.h:178
CZNC::AddUser
bool AddUser(CUser *pUser, CString &sErrorRet, bool bStartup=false)
EAddrType
EAddrType
Definition: Socket.h:77
CZNC::GetListeners
const std::vector< CListener * > & GetListeners() const
Definition: znc.h:158
CZNC::m_uiAnonIPLimit
unsigned int m_uiAnonIPLimit
Definition: znc.h:299
TCacheMap::AddItem
void AddItem(const K &Item)
This function adds an item to the cache using the default time-to-live value.
Definition: Utils.h:300
CZNC::operator=
CZNC & operator=(const CZNC &)=delete
CZNC::WritePidFile
bool WritePidFile(int iPid)
CZNC::SetMotd
void SetMotd(const CString &sMessage)
Definition: znc.h:212
Socket.h
CZNC::GetDisabledSSLProtocols
Csock::EDisableProtocol GetDisabledSSLProtocols() const
Definition: znc.h:173
CZNC::DeleteUsers
void DeleteUsers()
CZNC::m_uiConnectDelay
unsigned int m_uiConnectDelay
Definition: znc.h:298
CZNC::AddListener
bool AddListener(CListener *)
CZNC::TrafficStatsMap
std::map< CString, TrafficStatsPair > TrafficStatsMap
Definition: znc.h:95
CZNC::m_bProtectWebSessions
bool m_bProtectWebSessions
Definition: znc.h:310
CConfig
Definition: Config.h:36
CZNC::m_uiForceEncoding
unsigned int m_uiForceEncoding
Definition: znc.h:308
CZNC::LeakConnectQueueTimer
void LeakConnectQueueTimer(CConnectQueueTimer *pTimer)
CZNC::GetMaxBufferSize
unsigned int GetMaxBufferSize() const
Definition: znc.h:162
CZNC::FindModule
CModule * FindModule(const CString &sModName, const CString &sUsername)
CZNC::GetUptime
CString GetUptime() const
CZNC::IsHostAllowed
bool IsHostAllowed(const CString &sHostMask) const
CZNC::m_sPidFile
CString m_sPidFile
Definition: znc.h:288
CZNC::GetConnectionQueue
std::list< CIRCNetwork * > & GetConnectionQueue()
Definition: znc.h:234
CListener
Definition: Listener.h:27
CZNC::SetHideVersion
void SetHideVersion(bool b)
Definition: znc.h:125
CZNC::SetProtectWebSessions
void SetProtectWebSessions(bool b)
Definition: znc.h:124
CZNC::m_uDisabledSSLProtocols
unsigned int m_uDisabledSSLProtocols
Definition: znc.h:301
CZNC::ClearMotd
void ClearMotd()
Definition: znc.h:221
CZNC::SetConfigWriteDelay
void SetConfigWriteDelay(unsigned int i)
Definition: znc.h:131
CZNC::SetAnonIPLimit
void SetAnonIPLimit(unsigned int i)
Definition: znc.h:120
CZNC::SetSSLCiphers
void SetSSLCiphers(const CString &sCiphers)
Definition: znc.h:128
CZNC::GetAvailableSSLProtocols
static VCString GetAvailableSSLProtocols()
CZNC::m_pLockFile
CFile * m_pLockFile
Definition: znc.h:297
CZNC::m_sConfigFile
CString m_sConfigFile
Definition: znc.h:285
CZNC::ECONFIG_NEED_QUIT
@ ECONFIG_NEED_QUIT
Definition: znc.h:52
CZNC::AddServerThrottle
void AddServerThrottle(CString sName)
Definition: znc.h:225
CZNC::GetModules
CModules & GetModules()
Definition: znc.h:141
Csock::EDisableProtocol
EDisableProtocol
Definition: Csocket.h:627
CZNC::ForceEncoding
void ForceEncoding()
CZNC::SetAuthOnlyViaModule
void SetAuthOnlyViaModule(bool b)
Definition: znc.h:126
CZNC::GetManager
const CSockManager & GetManager() const
Definition: znc.h:140
CZNC::Get
static CZNC & Get()
CZNC::GetTrustedProxies
const VCString & GetTrustedProxies() const
Definition: znc.h:157
CZNC::BackupConfigOnce
void BackupConfigOnce(const CString &sSuffix)
TCacheMap< CString >
CZNC::m_eConfigState
enum ConfigState m_eConfigState
Definition: znc.h:274
CZNC::m_sSSLDHParamFile
CString m_sSSLDHParamFile
Definition: znc.h:291
CZNC::OnBoot
bool OnBoot()
CZNC::TrafficStatsPair
std::pair< unsigned long long, unsigned long long > TrafficStatsPair
Definition: znc.h:94
CZNC::PauseConnectQueue
void PauseConnectQueue()
CZNC::RehashConfig
bool RehashConfig(CString &sError)
CZNC::m_uBytesRead
unsigned long long m_uBytesRead
Definition: znc.h:303
CZNC::m_lpConnectQueue
std::list< CIRCNetwork * > m_lpConnectQueue
Definition: znc.h:305
CZNC::GetSSLProtocols
CString GetSSLProtocols() const
Definition: znc.h:172
CZNC::m_vsMotd
VCString m_vsMotd
Definition: znc.h:296
CZNC::BytesRead
unsigned long long BytesRead() const
Definition: znc.h:90
CZNC::ClearTrustedProxies
void ClearTrustedProxies()
CZNC::m_uBytesWritten
unsigned long long m_uBytesWritten
Definition: znc.h:304
CZNC::GetDHParamLocation
CString GetDHParamLocation() const
CZNC::SetStatusPrefix
void SetStatusPrefix(const CString &s)
Definition: znc.h:116
CZNC::AllowConnectionFrom
bool AllowConnectionFrom(const CString &sIP) const
Translation.h
CZNC::AuthUser
void AuthUser(std::shared_ptr< CAuthBase > AuthClass)
CZNC::SetMaxBufferSize
void SetMaxBufferSize(unsigned int i)
Definition: znc.h:119
CZNC::ECONFIG_NEED_VERBOSE_WRITE
@ ECONFIG_NEED_VERBOSE_WRITE
Definition: znc.h:50
CUser
Definition: User.h:38
CTranslationDomainRefHolder
Definition: Translation.h:61
CModules
Definition: Modules.h:1388
CZNC::TimeStarted
time_t TimeStarted() const
Definition: znc.h:161
CZNC::DelListener
bool DelListener(CListener *)
CListener::EAcceptType
EAcceptType
Definition: Listener.h:29
CZNC::GetNetworkTrafficStats
TrafficStatsMap GetNetworkTrafficStats(const CString &sUsername, TrafficStatsPair &Total)
CZNC::GetPemLocation
CString GetPemLocation() const
CIRCNetwork
Definition: IRCNetwork.h:40
CZNC::GetSSLCiphers
CString GetSSLCiphers() const
Definition: znc.h:171
CZNC::WriteConfig
bool WriteConfig()
CZNC::GetServerThrottle
unsigned int GetServerThrottle() const
Definition: znc.h:164
CZNC::GetProtectWebSessions
bool GetProtectWebSessions() const
Definition: znc.h:168
CZNC::GetKeyLocation
CString GetKeyLocation() const
CZNC::GetSSLCertFile
CString GetSSLCertFile() const
Definition: znc.h:176
VCString
std::vector< CString > VCString
Definition: ZNCString.h:38
CZNC::GetHideVersion
bool GetHideVersion() const
Definition: znc.h:169
CZNC::GetConfPath
CString GetConfPath(bool bAllowMkDir=true) const
CZNC::Broadcast
void Broadcast(const CString &sMessage, bool bAdminOnly=false, CUser *pSkipUser=nullptr, CClient *pSkipClient=nullptr)
CZNC::m_sConnectThrottle
TCacheMap< CString > m_sConnectThrottle
Definition: znc.h:309
CZNC::GetCompileOptionsString
static CString GetCompileOptionsString()
CZNC::m_mutexConfigState
std::mutex m_mutexConfigState
Definition: znc.h:275
CZNC::m_sSSLCiphers
CString m_sSSLCiphers
Definition: znc.h:292
CZNC::m_sSSLProtocols
CString m_sSSLProtocols
Definition: znc.h:293
CModule
The base class for your own ZNC modules.
Definition: Modules.h:406
CZNC::GetUserMap
const std::map< CString, CUser * > & GetUserMap() const
Definition: znc.h:200
CZNC::DumpConfig
static void DumpConfig(const CConfig *Config)
CCoreTranslationMixin
Definition: Translation.h:104
CZNC::m_sStatusPrefix
CString m_sStatusPrefix
Definition: znc.h:287
CZNC::GetServerThrottle
bool GetServerThrottle(CString sName)
Definition: znc.h:228
CZNC::GetHomePath
const CString & GetHomePath() const
CZNC::AddBytesWritten
void AddBytesWritten(unsigned long long u)
Definition: znc.h:89
CZNC::SetSkinName
void SetSkinName(const CString &s)
Definition: znc.h:115
CZNC::m_bAuthOnlyViaModule
bool m_bAuthOnlyViaModule
Definition: znc.h:312
CZNC::SetSSLCertFile
void SetSSLCertFile(const CString &sFile)
Definition: znc.h:130
CZNC::m_vsTrustedProxies
VCString m_vsTrustedProxies
Definition: znc.h:295
CZNC::SetConfigState
void SetConfigState(enum ConfigState e)
Definition: znc.h:111
TCacheMap::SetTTL
void SetTTL(unsigned int u)
Definition: Utils.h:395
CZNC::ConfigState
ConfigState
Definition: znc.h:46
CZNC
Definition: znc.h:38
CZNC::SetConnectDelay
void SetConnectDelay(unsigned int i)
CZNC::AddBytesRead
void AddBytesRead(unsigned long long u)
Definition: znc.h:88
CZNC::DeleteUser
bool DeleteUser(const CString &sUsername)
CZNC::ExpandConfigPath
CString ExpandConfigPath(const CString &sConfigFile, bool bAllowMkDir=true)
CZNC::m_Manager
CSockManager m_Manager
Definition: znc.h:280
CZNC::RemTrustedProxy
bool RemTrustedProxy(const CString &sHost)
CZNC::FindListener
CListener * FindListener(u_short uPort, const CString &BindHost, EAddrType eAddr)
CZNC::m_msUsers
std::map< CString, CUser * > m_msUsers
Definition: znc.h:278
CZNC::DisableConfigTimer
void DisableConfigTimer()
CZNC::GetConfigFile
const CString & GetConfigFile() const
Definition: znc.h:153
CZNC::ECONFIG_NOTHING
@ ECONFIG_NOTHING
Definition: znc.h:47
CZNC::GetVersion
static CString GetVersion()
CZNC::GetTrafficStats
TrafficStatsMap GetTrafficStats(TrafficStatsPair &Users, TrafficStatsPair &ZNC, TrafficStatsPair &Total)
CFile
Definition: FileUtils.h:30
CZNC::GetModPath
CString GetModPath() const
CZNC::m_uiMaxBufferSize
unsigned int m_uiMaxBufferSize
Definition: znc.h:300