mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Added Put*() wrappers in CSocket
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@386 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
19
Modules.cpp
19
Modules.cpp
@@ -133,6 +133,25 @@ bool CSocket::Listen(unsigned short uPort, bool bSSL, unsigned int uTimeout) {
|
||||
return m_pModule->GetManager()->ListenAll(uPort, sSockName, bSSL, SOMAXCONN, (Csock*) this);
|
||||
}
|
||||
|
||||
bool CSocket::PutIRC(const CString& sLine) {
|
||||
return (m_pModule) ? m_pModule->PutIRC(sLine) : false;
|
||||
}
|
||||
|
||||
bool CSocket::PutUser(const CString& sLine) {
|
||||
return (m_pModule) ? m_pModule->PutUser(sLine) : false;
|
||||
}
|
||||
|
||||
bool CSocket::PutStatus(const CString& sLine) {
|
||||
return (m_pModule) ? m_pModule->PutStatus(sLine) : false;
|
||||
}
|
||||
|
||||
bool CSocket::PutModule(const CString& sLine, const CString& sIdent, const CString& sHost) {
|
||||
return (m_pModule) ? m_pModule->PutModule(sLine, sIdent, sHost) : false;
|
||||
}
|
||||
bool CSocket::PutModNotice(const CString& sLine, const CString& sIdent, const CString& sHost) {
|
||||
return (m_pModule) ? m_pModule->PutModNotice(sLine, sIdent, sHost) : false;
|
||||
}
|
||||
|
||||
void CSocket::SetModule(CModule* p) { m_pModule = p; }
|
||||
void CSocket::SetLabel(const CString& s) { m_sLabel = s; }
|
||||
|
||||
|
||||
@@ -104,6 +104,11 @@ public:
|
||||
|
||||
bool Connect(const CString& sHostname, unsigned short uPort, bool bSSL = false, unsigned int uTimeout = 60);
|
||||
bool Listen(unsigned short uPort, bool bSSL = false, unsigned int uTimeout = 0);
|
||||
virtual bool PutIRC(const CString& sLine);
|
||||
virtual bool PutUser(const CString& sLine);
|
||||
virtual bool PutStatus(const CString& sLine);
|
||||
virtual bool PutModule(const CString& sLine, const CString& sIdent = "znc", const CString& sHost = "znc.com");
|
||||
virtual bool PutModNotice(const CString& sLine, const CString& sIdent = "znc", const CString& sHost = "znc.com");
|
||||
|
||||
// Setters
|
||||
void SetModule(CModule* p);
|
||||
|
||||
Reference in New Issue
Block a user