ZNC  trunk
IRCNetwork.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_IRCNETWORK_H
18 #define ZNC_IRCNETWORK_H
19 
20 #include <znc/zncconfig.h>
21 #include <znc/ZNCString.h>
22 #include <znc/Buffer.h>
23 #include <znc/Nick.h>
24 #include <znc/znc.h>
25 
26 class CModules;
27 class CUser;
28 class CFile;
29 class CConfig;
30 class CClient;
31 class CConfig;
32 class CChan;
33 class CQuery;
34 class CServer;
35 class CIRCSock;
36 class CIRCNetworkPingTimer;
37 class CIRCNetworkJoinTimer;
38 class CMessage;
39 
41  public:
42  static bool IsValidNetwork(const CString& sNetwork);
43 
44  CIRCNetwork(CUser* pUser, const CString& sName);
45  CIRCNetwork(CUser* pUser, const CIRCNetwork& Network);
46  ~CIRCNetwork();
47 
48  CIRCNetwork(const CIRCNetwork&) = delete;
49  CIRCNetwork& operator=(const CIRCNetwork&) = delete;
50 
51  void Clone(const CIRCNetwork& Network, bool bCloneName = true);
52 
53  CString GetNetworkPath() const;
54 
55  void DelServers();
56 
57  bool ParseConfig(CConfig* pConfig, CString& sError, bool bUpgrade = false);
58  CConfig ToConfig() const;
59 
60  void BounceAllClients();
61 
62  bool IsUserAttached() const { return !m_vClients.empty(); }
63  bool IsUserOnline() const;
64  void ClientConnected(CClient* pClient);
65  void ClientDisconnected(CClient* pClient);
66 
67  CUser* GetUser() const;
68  const CString& GetName() const;
69  bool IsNetworkAttached() const { return !m_vClients.empty(); }
70  const std::vector<CClient*>& GetClients() const { return m_vClients; }
71  std::vector<CClient*> FindClients(const CString& sIdentifier) const;
72 
73  void SetUser(CUser* pUser);
74  bool SetName(const CString& sName);
75 
76  // Modules
77  CModules& GetModules() { return *m_pModules; }
78  const CModules& GetModules() const { return *m_pModules; }
79  // !Modules
80 
81  bool PutUser(const CString& sLine, CClient* pClient = nullptr,
82  CClient* pSkipClient = nullptr);
83  bool PutUser(const CMessage& Message, CClient* pClient = nullptr,
84  CClient* pSkipClient = nullptr);
85  bool PutStatus(const CString& sLine, CClient* pClient = nullptr,
86  CClient* pSkipClient = nullptr);
87  bool PutModule(const CString& sModule, const CString& sLine,
88  CClient* pClient = nullptr, CClient* pSkipClient = nullptr);
89 
90  const std::vector<CChan*>& GetChans() const;
91  CChan* FindChan(CString sName) const;
92  std::vector<CChan*> FindChans(const CString& sWild) const;
93  bool AddChan(CChan* pChan);
94  bool AddChan(const CString& sName, bool bInConfig);
95  bool DelChan(const CString& sName);
96  bool MoveChan(const CString& sChan, unsigned int index, CString& sError);
97  bool SwapChans(const CString& sChan1, const CString& sChan2,
98  CString& sError);
99  void JoinChans();
100  void JoinChans(std::set<CChan*>& sChans);
101 
102  const std::vector<CQuery*>& GetQueries() const;
103  CQuery* FindQuery(const CString& sName) const;
104  std::vector<CQuery*> FindQueries(const CString& sWild) const;
105  CQuery* AddQuery(const CString& sName);
106  bool DelQuery(const CString& sName);
107 
108  const CString& GetChanPrefixes() const { return m_sChanPrefixes; }
109  void SetChanPrefixes(const CString& s) { m_sChanPrefixes = s; }
110  bool IsChan(const CString& sChan) const;
111 
112  const std::vector<CServer*>& GetServers() const;
113  bool HasServers() const { return !m_vServers.empty(); }
114  CServer* FindServer(const CString& sName) const;
115  bool DelServer(const CString& sName, unsigned short uPort,
116  const CString& sPass);
117  bool AddServer(const CString& sName);
118  bool AddServer(const CString& sName, unsigned short uPort,
119  const CString& sPass = "", bool bSSL = false);
120  CServer* GetNextServer(bool bAdvance = true);
121  CServer* GetCurrentServer() const;
122  void SetIRCServer(const CString& s);
123  bool SetNextServer(const CServer* pServer);
124  bool IsLastServer() const;
125 
128  }
129  void AddTrustedFingerprint(const CString& sFP) {
132  }
133  void DelTrustedFingerprint(const CString& sFP) {
134  m_ssTrustedFingerprints.erase(sFP);
135  }
137 
138  void SetIRCConnectEnabled(bool b);
140 
142  const CIRCSock* GetIRCSock() const { return m_pIRCSock; }
143  const CString& GetIRCServer() const;
144  const CNick& GetIRCNick() const;
145  void SetIRCNick(const CNick& n);
146  CString GetCurNick() const;
147  bool IsIRCAway() const { return m_bIRCAway; }
148  void SetIRCAway(bool b) { m_bIRCAway = b; }
149 
150  bool Connect();
154  bool IsIRCConnected() const;
155  void SetIRCSocket(CIRCSock* pIRCSock);
156  void IRCConnected();
157  void IRCDisconnected();
158  void CheckIRCConnect();
159 
160  bool PutIRC(const CString& sLine);
161  bool PutIRC(const CMessage& Message);
162 
163  // Buffers
164  void AddRawBuffer(const CMessage& Format, const CString& sText = "") {
165  m_RawBuffer.AddLine(Format, sText);
166  }
167  void UpdateRawBuffer(const CString& sCommand, const CMessage& Format,
168  const CString& sText = "") {
169  m_RawBuffer.UpdateLine(sCommand, Format, sText);
170  }
171  void UpdateExactRawBuffer(const CMessage& Format,
172  const CString& sText = "") {
173  m_RawBuffer.UpdateExactLine(Format, sText);
174  }
176 
178  void AddRawBuffer(const CString& sFormat, const CString& sText = "") {
179  m_RawBuffer.AddLine(sFormat, sText);
180  }
182  void UpdateRawBuffer(const CString& sMatch, const CString& sFormat,
183  const CString& sText = "") {
184  m_RawBuffer.UpdateLine(sMatch, sFormat, sText);
185  }
187  void UpdateExactRawBuffer(const CString& sFormat,
188  const CString& sText = "") {
189  m_RawBuffer.UpdateExactLine(sFormat, sText);
190  }
191 
192  void AddMotdBuffer(const CMessage& Format, const CString& sText = "") {
193  m_MotdBuffer.AddLine(Format, sText);
194  }
195  void UpdateMotdBuffer(const CString& sCommand, const CMessage& Format,
196  const CString& sText = "") {
197  m_MotdBuffer.UpdateLine(sCommand, Format, sText);
198  }
200 
202  void AddMotdBuffer(const CString& sFormat, const CString& sText = "") {
203  m_MotdBuffer.AddLine(sFormat, sText);
204  }
206  void UpdateMotdBuffer(const CString& sMatch, const CString& sFormat,
207  const CString& sText = "") {
208  m_MotdBuffer.UpdateLine(sMatch, sFormat, sText);
209  }
210 
211  void AddNoticeBuffer(const CMessage& Format, const CString& sText = "") {
212  m_NoticeBuffer.AddLine(Format, sText);
213  }
214  void UpdateNoticeBuffer(const CString& sCommand, const CMessage& Format,
215  const CString& sText = "") {
216  m_NoticeBuffer.UpdateLine(sCommand, Format, sText);
217  }
219 
221  void AddNoticeBuffer(const CString& sFormat, const CString& sText = "") {
222  m_NoticeBuffer.AddLine(sFormat, sText);
223  }
225  void UpdateNoticeBuffer(const CString& sMatch, const CString& sFormat,
226  const CString& sText = "") {
227  m_NoticeBuffer.UpdateLine(sMatch, sFormat, sText);
228  }
229 
230  void ClearQueryBuffer();
231  // !Buffers
232 
233  // la
234  const CString& GetNick(const bool bAllowDefault = true) const;
235  const CString& GetAltNick(const bool bAllowDefault = true) const;
236  const CString& GetIdent(const bool bAllowDefault = true) const;
237  CString GetRealName() const;
238  const CString& GetBindHost() const;
239  const CString& GetEncoding() const;
240  CString GetQuitMsg() const;
241 
242  void SetNick(const CString& s);
243  void SetAltNick(const CString& s);
244  void SetIdent(const CString& s);
245  void SetRealName(const CString& s);
246  void SetBindHost(const CString& s);
247  void SetEncoding(const CString& s);
248  void SetQuitMsg(const CString& s);
249 
250  double GetFloodRate() const { return m_fFloodRate; }
251  unsigned short int GetFloodBurst() const { return m_uFloodBurst; }
252  void SetFloodRate(double fFloodRate) { m_fFloodRate = fFloodRate; }
253  void SetFloodBurst(unsigned short int uFloodBurst) {
254  m_uFloodBurst = uFloodBurst;
255  }
256 
257  unsigned short int GetJoinDelay() const { return m_uJoinDelay; }
258  void SetJoinDelay(unsigned short int uJoinDelay) {
259  m_uJoinDelay = uJoinDelay;
260  }
261 
262  void SetTrustAllCerts(const bool bTrustAll = false) {
263  m_bTrustAllCerts = bTrustAll;
264  }
265  bool GetTrustAllCerts() const { return m_bTrustAllCerts; }
266 
267  void SetTrustPKI(const bool bTrustPKI = true) { m_bTrustPKI = bTrustPKI; }
268  bool GetTrustPKI() const { return m_bTrustPKI; }
269 
270  unsigned long long BytesRead() const { return m_uBytesRead; }
271  unsigned long long BytesWritten() const { return m_uBytesWritten; }
272 
273  void AddBytesRead(unsigned long long u) { m_uBytesRead += u; }
274  void AddBytesWritten(unsigned long long u) { m_uBytesWritten += u; }
275 
276  CString ExpandString(const CString& sStr) const;
277  CString& ExpandString(const CString& sStr, CString& sRet) const;
278 
279  private:
280  bool JoinChan(CChan* pChan);
281  bool LoadModule(const CString& sModName, const CString& sArgs,
282  const CString& sNotice, CString& sError);
283 
284  protected:
287 
296 
298 
299  std::vector<CClient*> m_vClients;
300 
302 
303  std::vector<CChan*> m_vChans;
304  std::vector<CQuery*> m_vQueries;
305 
307 
312  std::vector<CServer*> m_vServers;
313  size_t m_uServerIdx;
314 
317 
318  double m_fFloodRate;
319  unsigned short int m_uFloodBurst;
320 
324 
325  CIRCNetworkPingTimer* m_pPingTimer;
326  CIRCNetworkJoinTimer* m_pJoinTimer;
327 
328  unsigned short int m_uJoinDelay;
329  unsigned long long m_uBytesRead;
330  unsigned long long m_uBytesWritten;
331 };
332 
333 #endif // !ZNC_IRCNETWORK_H
CIRCNetwork::FindServer
CServer * FindServer(const CString &sName) const
CIRCNetwork::SetIdent
void SetIdent(const CString &s)
CIRCNetwork::GetIRCNick
const CNick & GetIRCNick() const
CIRCNetwork::GetClients
const std::vector< CClient * > & GetClients() const
Definition: IRCNetwork.h:70
CIRCNetwork::GetEncoding
const CString & GetEncoding() const
CIRCNetwork::GetCurrentServer
CServer * GetCurrentServer() const
CIRCNetwork::JoinChans
void JoinChans()
CIRCNetwork::GetIRCSock
const CIRCSock * GetIRCSock() const
Definition: IRCNetwork.h:142
CIRCNetwork::HasServers
bool HasServers() const
Definition: IRCNetwork.h:113
CIRCNetwork::m_pUser
CUser * m_pUser
Definition: IRCNetwork.h:286
CIRCNetwork::BytesWritten
unsigned long long BytesWritten() const
Definition: IRCNetwork.h:271
CBuffer::AddLine
size_type AddLine(const CMessage &Format, const CString &sText="")
CIRCNetwork::AddRawBuffer
void AddRawBuffer(const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:178
CIRCNetwork::m_bIRCConnectEnabled
bool m_bIRCConnectEnabled
Definition: IRCNetwork.h:308
CString::Escape_n
CString Escape_n(EEscape eFrom, EEscape eTo) const
CIRCNetwork::GetNick
const CString & GetNick(const bool bAllowDefault=true) const
Nick.h
CIRCNetwork::DelChan
bool DelChan(const CString &sName)
CClient
Definition: Client.h:99
CIRCNetwork::FindChan
CChan * FindChan(CString sName) const
ZNCString.h
CIRCNetwork::m_sBindHost
CString m_sBindHost
Definition: IRCNetwork.h:292
CIRCNetwork::ClearNoticeBuffer
void ClearNoticeBuffer()
Definition: IRCNetwork.h:218
CIRCNetwork::m_fFloodRate
double m_fFloodRate
Set to -1 to disable protection.
Definition: IRCNetwork.h:318
CIRCNetwork::m_uBytesRead
unsigned long long m_uBytesRead
Definition: IRCNetwork.h:329
znc.h
CIRCNetwork::DelServers
void DelServers()
CQuery
Definition: Query.h:29
CIRCNetwork::m_sEncoding
CString m_sEncoding
Definition: IRCNetwork.h:293
CIRCNetwork::GetTrustAllCerts
bool GetTrustAllCerts() const
Definition: IRCNetwork.h:265
CIRCNetwork::SetBindHost
void SetBindHost(const CString &s)
CIRCNetwork::m_IRCNick
CNick m_IRCNick
Definition: IRCNetwork.h:315
CIRCNetwork::UpdateExactRawBuffer
void UpdateExactRawBuffer(const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:187
CIRCNetwork::m_uFloodBurst
unsigned short int m_uFloodBurst
Definition: IRCNetwork.h:319
CIRCNetwork::AddNoticeBuffer
void AddNoticeBuffer(const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:221
CIRCNetwork::IRCDisconnected
void IRCDisconnected()
CIRCNetwork::m_uServerIdx
size_t m_uServerIdx
Index in m_vServers of our current server + 1.
Definition: IRCNetwork.h:313
CIRCNetwork::m_RawBuffer
CBuffer m_RawBuffer
Definition: IRCNetwork.h:321
CIRCNetwork::ToConfig
CConfig ToConfig() const
CServer
Definition: Server.h:23
CIRCNetwork::m_sRealName
CString m_sRealName
Definition: IRCNetwork.h:291
CIRCNetwork::m_vChans
std::vector< CChan * > m_vChans
Definition: IRCNetwork.h:303
CIRCNetwork::GetTrustedFingerprints
const SCString & GetTrustedFingerprints() const
Definition: IRCNetwork.h:126
CBuffer::UpdateLine
size_type UpdateLine(const CString &sCommand, const CMessage &Format, const CString &sText="")
CIRCNetwork::m_bTrustAllCerts
bool m_bTrustAllCerts
Definition: IRCNetwork.h:309
CIRCNetwork::IsLastServer
bool IsLastServer() const
CIRCNetwork::BounceAllClients
void BounceAllClients()
CIRCNetwork::m_pModules
CModules * m_pModules
Definition: IRCNetwork.h:297
CIRCNetwork::FindQueries
std::vector< CQuery * > FindQueries(const CString &sWild) const
CIRCNetwork::DelQuery
bool DelQuery(const CString &sName)
CIRCNetwork::IsIRCConnected
bool IsIRCConnected() const
This method will return whether the user is connected and authenticated to an IRC server.
CIRCNetwork::GetIRCSock
CIRCSock * GetIRCSock()
Definition: IRCNetwork.h:141
CIRCNetwork::GetBindHost
const CString & GetBindHost() const
CIRCNetwork::SetNextServer
bool SetNextServer(const CServer *pServer)
CIRCNetwork::AddRawBuffer
void AddRawBuffer(const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:164
CIRCNetwork::SetFloodBurst
void SetFloodBurst(unsigned short int uFloodBurst)
Definition: IRCNetwork.h:253
CIRCNetwork::PutUser
bool PutUser(const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr)
CIRCNetwork::ClientDisconnected
void ClientDisconnected(CClient *pClient)
CIRCNetwork::GetQueries
const std::vector< CQuery * > & GetQueries() const
CIRCNetwork::m_vServers
std::vector< CServer * > m_vServers
Definition: IRCNetwork.h:312
SCString
std::set< CString > SCString
Definition: ZNCString.h:35
CIRCNetwork::ExpandString
CString ExpandString(const CString &sStr) const
CIRCNetwork::m_pIRCSock
CIRCSock * m_pIRCSock
Definition: IRCNetwork.h:301
CIRCNetwork::m_pJoinTimer
CIRCNetworkJoinTimer * m_pJoinTimer
Definition: IRCNetwork.h:326
CBuffer::UpdateExactLine
size_type UpdateExactLine(const CMessage &Format, const CString &sText="")
CMessage
Here is a small explanation of how messages on IRC work, and how you can use this class to get useful...
Definition: Message.h:70
CIRCNetwork::ClearQueryBuffer
void ClearQueryBuffer()
CString::EHEXCOLON
@ EHEXCOLON
Definition: ZNCString.h:78
CIRCNetwork::UpdateRawBuffer
void UpdateRawBuffer(const CString &sCommand, const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:167
CIRCNetwork::MoveChan
bool MoveChan(const CString &sChan, unsigned int index, CString &sError)
CIRCNetwork::GetIRCServer
const CString & GetIRCServer() const
CIRCNetwork::FindChans
std::vector< CChan * > FindChans(const CString &sWild) const
CString
String class that is used inside ZNC.
Definition: ZNCString.h:68
CIRCNetwork::AddNoticeBuffer
void AddNoticeBuffer(const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:211
CIRCNetwork::SwapChans
bool SwapChans(const CString &sChan1, const CString &sChan2, CString &sError)
CIRCNetwork::m_sIdent
CString m_sIdent
Definition: IRCNetwork.h:290
CIRCNetwork::m_sName
CString m_sName
Definition: IRCNetwork.h:285
CIRCNetwork::SetFloodRate
void SetFloodRate(double fFloodRate)
Definition: IRCNetwork.h:252
CIRCNetwork::GetCurNick
CString GetCurNick() const
CIRCNetwork::DelTrustedFingerprint
void DelTrustedFingerprint(const CString &sFP)
Definition: IRCNetwork.h:133
CIRCNetwork::AddTrustedFingerprint
void AddTrustedFingerprint(const CString &sFP)
Definition: IRCNetwork.h:129
CIRCNetwork::PutIRC
bool PutIRC(const CString &sLine)
CIRCNetwork::PutModule
bool PutModule(const CString &sModule, const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr)
CIRCNetwork::UpdateMotdBuffer
void UpdateMotdBuffer(const CString &sCommand, const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:195
CIRCNetwork::SetTrustAllCerts
void SetTrustAllCerts(const bool bTrustAll=false)
Definition: IRCNetwork.h:262
CIRCNetwork::UpdateMotdBuffer
void UpdateMotdBuffer(const CString &sMatch, const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:206
CIRCNetwork::m_uJoinDelay
unsigned short int m_uJoinDelay
Definition: IRCNetwork.h:328
CIRCNetwork::UpdateExactRawBuffer
void UpdateExactRawBuffer(const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:171
CIRCNetwork::SetEncoding
void SetEncoding(const CString &s)
CIRCNetwork::SetQuitMsg
void SetQuitMsg(const CString &s)
CIRCNetwork::AddMotdBuffer
void AddMotdBuffer(const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:202
CChan
Definition: Chan.h:35
CIRCNetwork::m_ssTrustedFingerprints
SCString m_ssTrustedFingerprints
Definition: IRCNetwork.h:295
CIRCNetwork::m_sIRCServer
CString m_sIRCServer
Definition: IRCNetwork.h:311
CIRCNetwork::~CIRCNetwork
~CIRCNetwork()
CConfig
Definition: Config.h:36
CIRCSock
Definition: IRCSock.h:35
CIRCNetwork::m_pPingTimer
CIRCNetworkPingTimer * m_pPingTimer
Definition: IRCNetwork.h:325
CIRCNetwork::m_sChanPrefixes
CString m_sChanPrefixes
Definition: IRCNetwork.h:306
CIRCNetwork::IsIRCAway
bool IsIRCAway() const
Definition: IRCNetwork.h:147
CIRCNetwork::SetUser
void SetUser(CUser *pUser)
CIRCNetwork::ClearTrustedFingerprints
void ClearTrustedFingerprints()
Definition: IRCNetwork.h:136
CIRCNetwork::SetAltNick
void SetAltNick(const CString &s)
CIRCNetwork::GetQuitMsg
CString GetQuitMsg() const
CIRCNetwork::m_sQuitMsg
CString m_sQuitMsg
Definition: IRCNetwork.h:294
CIRCNetwork::SetName
bool SetName(const CString &sName)
CIRCNetwork::GetFloodBurst
unsigned short int GetFloodBurst() const
Definition: IRCNetwork.h:251
CIRCNetwork::GetJoinDelay
unsigned short int GetJoinDelay() const
Definition: IRCNetwork.h:257
CIRCNetwork::DelServer
bool DelServer(const CString &sName, unsigned short uPort, const CString &sPass)
CIRCNetwork::Connect
bool Connect()
CBuffer
Definition: Buffer.h:74
CIRCNetwork::SetNick
void SetNick(const CString &s)
CIRCNetwork::AddBytesWritten
void AddBytesWritten(unsigned long long u)
Definition: IRCNetwork.h:274
CIRCNetwork::m_bIRCAway
bool m_bIRCAway
Definition: IRCNetwork.h:316
CIRCNetwork::m_uBytesWritten
unsigned long long m_uBytesWritten
Definition: IRCNetwork.h:330
CIRCNetwork::GetChans
const std::vector< CChan * > & GetChans() const
CIRCNetwork::GetName
const CString & GetName() const
Buffer.h
CIRCNetwork::GetTrustPKI
bool GetTrustPKI() const
Definition: IRCNetwork.h:268
CIRCNetwork::CheckIRCConnect
void CheckIRCConnect()
CIRCNetwork::GetModules
CModules & GetModules()
Definition: IRCNetwork.h:77
CIRCNetwork::UpdateRawBuffer
void UpdateRawBuffer(const CString &sMatch, const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:182
CIRCNetwork::GetRealName
CString GetRealName() const
CIRCNetwork::operator=
CIRCNetwork & operator=(const CIRCNetwork &)=delete
CIRCNetwork::IsUserOnline
bool IsUserOnline() const
CIRCNetwork::GetIdent
const CString & GetIdent(const bool bAllowDefault=true) const
CBuffer::Clear
void Clear()
Definition: Buffer.h:100
CIRCNetwork::m_sAltNick
CString m_sAltNick
Definition: IRCNetwork.h:289
CIRCNetwork::Clone
void Clone(const CIRCNetwork &Network, bool bCloneName=true)
CIRCNetwork::SetRealName
void SetRealName(const CString &s)
CIRCNetwork::CIRCNetwork
CIRCNetwork(CUser *pUser, const CString &sName)
CUser
Definition: User.h:38
CIRCNetwork::AddQuery
CQuery * AddQuery(const CString &sName)
CModules
Definition: Modules.h:1388
CIRCNetwork::PutStatus
bool PutStatus(const CString &sLine, CClient *pClient=nullptr, CClient *pSkipClient=nullptr)
CIRCNetwork::SetChanPrefixes
void SetChanPrefixes(const CString &s)
Definition: IRCNetwork.h:109
CIRCNetwork::SetIRCSocket
void SetIRCSocket(CIRCSock *pIRCSock)
CIRCNetwork::ClientConnected
void ClientConnected(CClient *pClient)
CIRCNetwork::GetChanPrefixes
const CString & GetChanPrefixes() const
Definition: IRCNetwork.h:108
CIRCNetwork
Definition: IRCNetwork.h:40
CIRCNetwork::SetJoinDelay
void SetJoinDelay(unsigned short int uJoinDelay)
Definition: IRCNetwork.h:258
CIRCNetwork::m_NoticeBuffer
CBuffer m_NoticeBuffer
Definition: IRCNetwork.h:323
CIRCNetwork::ClearRawBuffer
void ClearRawBuffer()
Definition: IRCNetwork.h:175
CIRCNetwork::SetTrustPKI
void SetTrustPKI(const bool bTrustPKI=true)
Definition: IRCNetwork.h:267
CIRCNetwork::GetAltNick
const CString & GetAltNick(const bool bAllowDefault=true) const
CIRCNetwork::FindClients
std::vector< CClient * > FindClients(const CString &sIdentifier) const
CIRCNetwork::GetUser
CUser * GetUser() const
CIRCNetwork::GetFloodRate
double GetFloodRate() const
Definition: IRCNetwork.h:250
CIRCNetwork::IsNetworkAttached
bool IsNetworkAttached() const
Definition: IRCNetwork.h:69
CIRCNetwork::GetServers
const std::vector< CServer * > & GetServers() const
CIRCNetwork::GetModules
const CModules & GetModules() const
Definition: IRCNetwork.h:78
CIRCNetwork::IsUserAttached
bool IsUserAttached() const
Definition: IRCNetwork.h:62
CIRCNetwork::SetIRCNick
void SetIRCNick(const CNick &n)
CNick
Definition: Nick.h:29
CIRCNetwork::AddServer
bool AddServer(const CString &sName)
CIRCNetwork::AddChan
bool AddChan(CChan *pChan)
CIRCNetwork::BytesRead
unsigned long long BytesRead() const
Definition: IRCNetwork.h:270
CIRCNetwork::m_vQueries
std::vector< CQuery * > m_vQueries
Definition: IRCNetwork.h:304
CIRCNetwork::ClearMotdBuffer
void ClearMotdBuffer()
Definition: IRCNetwork.h:199
CIRCNetwork::IsValidNetwork
static bool IsValidNetwork(const CString &sNetwork)
CCoreTranslationMixin
Definition: Translation.h:104
CIRCNetwork::GetNetworkPath
CString GetNetworkPath() const
CIRCNetwork::m_bTrustPKI
bool m_bTrustPKI
Definition: IRCNetwork.h:310
CIRCNetwork::AddBytesRead
void AddBytesRead(unsigned long long u)
Definition: IRCNetwork.h:273
CIRCNetwork::FindQuery
CQuery * FindQuery(const CString &sName) const
CIRCNetwork::UpdateNoticeBuffer
void UpdateNoticeBuffer(const CString &sMatch, const CString &sFormat, const CString &sText="")
Definition: IRCNetwork.h:225
CIRCNetwork::UpdateNoticeBuffer
void UpdateNoticeBuffer(const CString &sCommand, const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:214
CIRCNetwork::GetNextServer
CServer * GetNextServer(bool bAdvance=true)
CIRCNetwork::ParseConfig
bool ParseConfig(CConfig *pConfig, CString &sError, bool bUpgrade=false)
CIRCNetwork::IsChan
bool IsChan(const CString &sChan) const
CIRCNetwork::IRCConnected
void IRCConnected()
CIRCNetwork::SetIRCConnectEnabled
void SetIRCConnectEnabled(bool b)
CFile
Definition: FileUtils.h:30
CIRCNetwork::GetIRCConnectEnabled
bool GetIRCConnectEnabled() const
Definition: IRCNetwork.h:139
CIRCNetwork::m_sNick
CString m_sNick
Definition: IRCNetwork.h:288
CIRCNetwork::SetIRCAway
void SetIRCAway(bool b)
Definition: IRCNetwork.h:148
CIRCNetwork::m_MotdBuffer
CBuffer m_MotdBuffer
Definition: IRCNetwork.h:322
CIRCNetwork::SetIRCServer
void SetIRCServer(const CString &s)
CIRCNetwork::AddMotdBuffer
void AddMotdBuffer(const CMessage &Format, const CString &sText="")
Definition: IRCNetwork.h:192
CIRCNetwork::m_vClients
std::vector< CClient * > m_vClients
Definition: IRCNetwork.h:299