20 #include <znc/zncconfig.h>
139 return (c !=
'\0' &&
GetPerms().find(c) != CString::npos);
142 return (c !=
'\0' &&
GetPermModes().find(c) != CString::npos);
166 const CString& sDefault =
"")
const;
169 const CString& sDefault =
"")
const;
177 bool OnAccountMessage(
CMessage& Message);
179 bool OnAwayMessage(
CMessage& Message);
180 bool OnCapabilityMessage(
CMessage& Message);
183 bool OnErrorMessage(
CMessage& Message);
184 bool OnInviteMessage(
CMessage& Message);
192 bool OnPingMessage(
CMessage& Message);
193 bool OnPongMessage(
CMessage& Message);
197 bool OnWallopsMessage(
CMessage& Message);
198 bool OnServerCapAvailable(
const CString& sCap,
const CString& sValue);
201 void SetNick(
const CString& sNick);
202 void ParseISupport(
const CMessage& Message);
204 void SendAltNick(
const CString& sBadNick);
std::set< CString > SCString
Definition: ZNCString.h:35
std::vector< CString > VCString
Definition: ZNCString.h:38
Definition: Message.h:231
Definition: Message.h:242
Definition: Message.h:338
Definition: IRCNetwork.h:40
VCString m_vsSSLError
Definition: IRCSock.h:240
void ReachedMaxBuffer() override
This WARNING event is called when your buffer for readline exceeds the warning threshold and triggers...
CString m_sPermModes
Definition: IRCSock.h:217
const MCString & GetISupport() const
Definition: IRCSock.h:167
SCString m_ssPendingCaps
Definition: IRCSock.h:227
CIRCSock & operator=(const CIRCSock &)=delete
std::set< char > m_scUserModes
Definition: IRCSock.h:218
CIRCSock(const CIRCSock &)=delete
void PutIRCRaw(const CString &sLine)
Sends a raw data line to the server.
bool m_bExtendedJoin
Definition: IRCSock.h:214
EChanModeArgs GetModeType(char cMode) const
CString m_sPerms
Definition: IRCSock.h:216
static const time_t m_uCTCPFloodTime
Definition: IRCSock.h:231
void SetTagSupport(const CString &sTag, bool bState)
Registers a tag as being supported or unsupported by the server.
void SetPass(const CString &s)
Definition: IRCSock.h:127
bool IsPermMode(const char c) const
Definition: IRCSock.h:141
CIRCNetwork * GetNetwork() const
Definition: IRCSock.h:149
short int m_iSendsAllowed
Definition: IRCSock.h:235
bool m_bUHNames
Definition: IRCSock.h:211
const CString & GetPerms() const
Definition: IRCSock.h:144
bool IsAuthed() const
Definition: IRCSock.h:160
bool IsCapAccepted(const CString &sCap)
Definition: IRCSock.h:162
char GetPermFromMode(char cMode) const
bool m_bAuthed
Definition: IRCSock.h:209
void Quit(const CString &sQuitMsg="")
CNick m_Nick
Definition: IRCSock.h:221
const SCString & GetAcceptedCaps() const
Definition: IRCSock.h:161
void SSLCertError(X509 *pCert) override
bool IsTagEnabled(const CString &sTag) const
Definition: IRCSock.h:116
void PutIRCQuick(const CString &sLine)
Should be used for PONG only.
void Timeout() override
Sock Timed out event.
unsigned int m_uNumCTCP
Definition: IRCSock.h:230
const CString & GetNick() const
Definition: IRCSock.h:147
bool m_bNamesx
Definition: IRCSock.h:210
unsigned int m_uMaxNickLen
Definition: IRCSock.h:224
CIRCNetwork * m_pNetwork
Definition: IRCSock.h:220
void Connected() override
Connected event.
bool m_bFloodProtection
Definition: IRCSock.h:238
MCString m_msCapLsValues
Definition: IRCSock.h:228
void PauseCap()
You can call this from CModule::OnServerCapResult to suspend sending other CAP requests and CAP END f...
time_t m_lastCTCP
Definition: IRCSock.h:229
bool m_bServerTime
Definition: IRCSock.h:215
char GetModeFromPerm(char cPerm) const
SCString m_ssAcceptedCaps
Definition: IRCSock.h:226
static const unsigned int m_uCTCPFloodCount
Definition: IRCSock.h:232
CString GetCapLsValue(const CString &sKey, const CString &sDefault="") const
EChanModeArgs
Definition: IRCSock.h:43
@ HasArg
Definition: IRCSock.h:47
@ ListArg
Definition: IRCSock.h:46
@ ArgWhenSet
Definition: IRCSock.h:48
@ NoArg
Definition: IRCSock.h:49
void ReadLine(const CString &sData) override
void SockError(int iErrno, const CString &sDescription) override
bool HasAccountNotify() const
Definition: IRCSock.h:153
SCString m_ssSupportedTags
Definition: IRCSock.h:239
CIRCSock(CIRCNetwork *pNetwork)
bool m_bAccountNotify
Definition: IRCSock.h:213
std::map< char, EChanModeArgs > m_mceChanModes
Definition: IRCSock.h:219
friend class CCoreCaps
Definition: IRCSock.h:243
CString GetNickMask() const
Definition: IRCSock.h:146
const CString & GetPass() const
Definition: IRCSock.h:148
bool HasExtendedJoin() const
Definition: IRCSock.h:154
unsigned int GetMaxNickLen() const
Definition: IRCSock.h:131
friend class CIRCFloodTimer
Definition: IRCSock.h:242
CString GetISupport(const CString &sKey, const CString &sDefault="") const
bool IsPermChar(const char c) const
Definition: IRCSock.h:138
MCString m_mISupport
Definition: IRCSock.h:233
void ResumeCap()
If you used PauseCap, call this when CAP negotiation and logging in should be resumed again.
const std::map< char, EChanModeArgs > & GetChanModes() const
Definition: IRCSock.h:135
bool HasUHNames() const
Definition: IRCSock.h:151
bool HasServerTime() const
Definition: IRCSock.h:155
std::deque< CMessage > m_vSendQueue
Definition: IRCSock.h:234
unsigned int m_uCapPaused
Definition: IRCSock.h:225
std::map< CString, CChan * > m_msChans
Definition: IRCSock.h:223
double m_fFloodRate
Definition: IRCSock.h:237
bool HasNamesx() const
Definition: IRCSock.h:150
void Disconnected() override
Disconnected event.
void PutIRC(const CMessage &Message)
Sends a message to the server.
static bool IsFloodProtected(double fRate)
bool HasAwayNotify() const
Definition: IRCSock.h:152
unsigned short int m_uFloodBurst
Definition: IRCSock.h:236
void ConnectionRefused() override
Connection Refused Event.
const std::set< char > & GetUserModes() const
Definition: IRCSock.h:156
const CString & GetPermModes() const
Definition: IRCSock.h:145
void PutIRC(const CString &sLine)
Sends a message to the server.
bool m_bAwayNotify
Definition: IRCSock.h:212
CString m_sPass
Definition: IRCSock.h:222
Base IRC socket for client<->ZNC, and ZNC<->server.
Definition: Socket.h:309
Definition: Message.h:252
Definition: Message.h:293
Here is a small explanation of how messages on IRC work, and how you can use this class to get useful...
Definition: Message.h:57
Definition: Message.h:259
Definition: Message.h:272
const CString & GetNick() const
CString GetNickMask() const
Definition: Message.h:280
Definition: Message.h:287
Definition: Message.h:304
Definition: Message.h:313
String class that is used inside ZNC.
Definition: ZNCString.h:68
Definition: Message.h:322
Definition: Message.h:329
A dictionary for strings.
Definition: ZNCString.h:595