mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Add the OnIRCConnectionError(CIRCSock *pIRCSock) module hook
This commit is contained in:
@@ -51,6 +51,10 @@ CIRCSock::CIRCSock(CUser* pUser) : CZNCSock() {
|
||||
}
|
||||
|
||||
CIRCSock::~CIRCSock() {
|
||||
if (!m_bAuthed) {
|
||||
MODULECALL(OnIRCConnectionError(this), m_pUser, NULL, NOTHING);
|
||||
}
|
||||
|
||||
const vector<CChan*>& vChans = m_pUser->GetChans();
|
||||
for (unsigned int a = 0; a < vChans.size(); a++) {
|
||||
vChans[a]->Reset();
|
||||
|
||||
@@ -461,6 +461,7 @@ void CModule::OnPostRehash() {}
|
||||
void CModule::OnIRCDisconnected() {}
|
||||
void CModule::OnIRCConnected() {}
|
||||
CModule::EModRet CModule::OnIRCConnecting(CIRCSock *IRCSock) { return CONTINUE; }
|
||||
void CModule::OnIRCConnectionError(CIRCSock *IRCSock) {}
|
||||
CModule::EModRet CModule::OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnBroadcast(CString& sMessage) { return CONTINUE; }
|
||||
CModule::EModRet CModule::OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan) { return CONTINUE; }
|
||||
@@ -620,6 +621,7 @@ bool CModules::OnPreRehash() { MODUNLOADCHK(OnPreRehash()); return false; }
|
||||
bool CModules::OnPostRehash() { MODUNLOADCHK(OnPostRehash()); return false; }
|
||||
bool CModules::OnIRCConnected() { MODUNLOADCHK(OnIRCConnected()); return false; }
|
||||
bool CModules::OnIRCConnecting(CIRCSock *pIRCSock) { MODHALTCHK(OnIRCConnecting(pIRCSock)); }
|
||||
bool CModules::OnIRCConnectionError(CIRCSock *pIRCSock) { MODUNLOADCHK(OnIRCConnectionError(pIRCSock)); return false; }
|
||||
bool CModules::OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName) { MODHALTCHK(OnIRCRegistration(sPass, sNick, sIdent, sRealName)); }
|
||||
bool CModules::OnBroadcast(CString& sMessage) { MODHALTCHK(OnBroadcast(sMessage)); }
|
||||
bool CModules::OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan) { MODHALTCHK(OnConfigLine(sName, sValue, pUser, pChan)); }
|
||||
|
||||
@@ -392,6 +392,11 @@ public:
|
||||
* @return See CModule::EModRet.
|
||||
*/
|
||||
virtual EModRet OnIRCConnecting(CIRCSock *pIRCSock);
|
||||
/** This module hook is called when a CIRCSock fails to connect or
|
||||
* a module returned HALTCORE from OnIRCConnecting.
|
||||
* @param pIRCSock The socket that failed to connect.
|
||||
*/
|
||||
virtual void OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
/** This module hook is called before loging in to the IRC server. The
|
||||
* low-level connection is established at this point, but SSL
|
||||
* handshakes didn't necessarily finish yet.
|
||||
@@ -913,6 +918,7 @@ public:
|
||||
bool OnIRCDisconnected();
|
||||
bool OnIRCConnected();
|
||||
bool OnIRCConnecting(CIRCSock *pIRCSock);
|
||||
bool OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
bool OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
bool OnBroadcast(CString& sMessage);
|
||||
bool OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan);
|
||||
|
||||
@@ -10,6 +10,7 @@ void OnPostRehash()
|
||||
void OnIRCDisconnected()
|
||||
void OnIRCConnected()
|
||||
EModRet OnIRCConnecting(CIRCSock *pIRCSock)
|
||||
void OnIRCConnectionError(CIRCSock *pIRCSock)
|
||||
EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName)
|
||||
EModRet OnBroadcast(CString& sMessage)
|
||||
EModRet OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan)
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
virtual void OnIRCDisconnected();
|
||||
virtual void OnIRCConnected();
|
||||
virtual EModRet OnIRCConnecting(CIRCSock *pIRCSock);
|
||||
virtual void OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
virtual EModRet OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan);
|
||||
|
||||
@@ -295,6 +295,7 @@ sub OnPostRehash {}
|
||||
sub OnIRCDisconnected {}
|
||||
sub OnIRCConnected {}
|
||||
sub OnIRCConnecting {}
|
||||
sub OnIRCConnectionError {}
|
||||
sub OnIRCRegistration {}
|
||||
sub OnBroadcast {}
|
||||
sub OnConfigLine {}
|
||||
|
||||
@@ -10,6 +10,7 @@ void OnPostRehash()
|
||||
void OnIRCDisconnected()
|
||||
void OnIRCConnected()
|
||||
EModRet OnIRCConnecting(CIRCSock *pIRCSock)
|
||||
void OnIRCConnectionError(CIRCSock *pIRCSock)
|
||||
EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName)
|
||||
EModRet OnBroadcast(CString& sMessage)
|
||||
EModRet OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan)
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
virtual void OnIRCDisconnected();
|
||||
virtual void OnIRCConnected();
|
||||
virtual EModRet OnIRCConnecting(CIRCSock *pIRCSock);
|
||||
virtual void OnIRCConnectionError(CIRCSock *pIRCSock);
|
||||
virtual EModRet OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName);
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
virtual EModRet OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan);
|
||||
|
||||
@@ -139,6 +139,7 @@ class Module:
|
||||
def OnIRCDisconnected(self): pass
|
||||
def OnIRCConnected(self): pass
|
||||
def OnIRCConnecting(self, IRCSock): pass
|
||||
def OnIRCConnectionError(self, IRCSock): pass
|
||||
def OnIRCRegistration(self, sPass, sNick, sIdent, sRealName): pass
|
||||
def OnBroadcast(self, sMessage): pass
|
||||
def OnConfigLine(self, sName, sValue, pUser, pChan): pass
|
||||
|
||||
Reference in New Issue
Block a user