mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
Add OnUnknownUserRaw() global module call.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1314 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -72,6 +72,9 @@ void CClient::ReadLine(const CString& sData) {
|
||||
#ifdef _MODULES
|
||||
if (IsAttached()) {
|
||||
MODULECALL(OnUserRaw(sLine), m_pUser, this, return);
|
||||
} else {
|
||||
if (CZNC::Get().GetModules().OnUnknownUserRaw(this, sLine))
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -564,6 +564,7 @@ CModule::EModRet CGlobalModule::OnDeleteUser(CUser& User) { return CONTINUE; }
|
||||
void CGlobalModule::OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort) {}
|
||||
CModule::EModRet CGlobalModule::OnLoginAttempt(CSmartPtr<CAuthBase> Auth) { return CONTINUE; }
|
||||
void CGlobalModule::OnFailedLogin(const CString& sUsername, const CString& sRemoteIP) {}
|
||||
CModule::EModRet CGlobalModule::OnUnknownUserRaw(CClient* pClient, CString& sLine) { return CONTINUE; }
|
||||
|
||||
|
||||
CModules::CModules() {
|
||||
@@ -672,6 +673,10 @@ void CGlobalModules::OnFailedLogin(const CString& sUsername, const CString& sRem
|
||||
GLOBALMODCALL(OnFailedLogin(sUsername, sRemoteIP));
|
||||
}
|
||||
|
||||
bool CGlobalModules::OnUnknownUserRaw(CClient* pClient, CString& sLine) {
|
||||
GLOBALMODHALTCHK(OnUnknownUserRaw(pClient, sLine));
|
||||
}
|
||||
|
||||
CModule* CModules::FindModule(const CString& sModule) const {
|
||||
for (unsigned int a = 0; a < size(); a++) {
|
||||
if (sModule.Equals((*this)[a]->GetModName())) {
|
||||
|
||||
@@ -458,6 +458,7 @@ public:
|
||||
virtual void OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort);
|
||||
virtual EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth);
|
||||
virtual void OnFailedLogin(const CString& sUsername, const CString& sRemoteIP);
|
||||
virtual EModRet OnUnknownUserRaw(CClient* pClient, CString& sLine);
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -471,6 +472,7 @@ public:
|
||||
void OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort);
|
||||
bool OnLoginAttempt(CSmartPtr<CAuthBase> Auth);
|
||||
void OnFailedLogin(const CString& sUsername, const CString& sRemoteIP);
|
||||
bool OnUnknownUserRaw(CClient* pClient, CString& sLine);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user