Rename OnUserAttached and OnUserDetached and add OnClientConnect

OnUserAttached is renamed to OnClientLogin and
OnUserDetached to OnClientDisconnect.
This adds some new function with different arguments for the old names to cause
warnings from -Woverloaded-virtual while compiling.

This patch also adds OnClientConnect() which is called when the low-level
raw connection is established. (No SSL-handshake was done at this point yet!)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1266 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-10-29 17:26:30 +00:00
parent e85ed684ea
commit db21f88584
12 changed files with 36 additions and 25 deletions

View File

@@ -473,8 +473,8 @@ void CModule::OnKick(const CNick& Nick, const CString& sKickedNick, CChan& Chann
void CModule::OnJoin(const CNick& Nick, CChan& Channel) {}
void CModule::OnPart(const CNick& Nick, CChan& Channel) {}
void CModule::OnUserAttached() {}
void CModule::OnUserDetached() {}
void CModule::OnClientLogin() {}
void CModule::OnClientDisconnect() {}
CModule::EModRet CModule::OnUserRaw(CString& sLine) { return CONTINUE; }
CModule::EModRet CModule::OnUserCTCPReply(CString& sTarget, CString& sMessage) { return CONTINUE; }
CModule::EModRet CModule::OnUserCTCP(CString& sTarget, CString& sMessage) { return CONTINUE; }
@@ -539,6 +539,7 @@ bool CModule::PutModNotice(const CString& sLine, const CString& sIdent, const CS
///////////////////
CModule::EModRet CGlobalModule::OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan) { return CONTINUE; }
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) {}
@@ -591,8 +592,8 @@ bool CModules::OnRawMode(const CNick& OpNick, CChan& Channel, const CString& sMo
bool CModules::OnMode(const CNick& OpNick, CChan& Channel, char uMode, const CString& sArg, bool bAdded, bool bNoChange) { MODUNLOADCHK(OnMode(OpNick, Channel, uMode, sArg, bAdded, bNoChange)); return false; }
bool CModules::OnRaw(CString& sLine) { MODHALTCHK(OnRaw(sLine)); }
bool CModules::OnUserAttached() { MODUNLOADCHK(OnUserAttached()); return false; }
bool CModules::OnUserDetached() { MODUNLOADCHK(OnUserDetached()); return false; }
bool CModules::OnClientLogin() { MODUNLOADCHK(OnClientLogin()); return false; }
bool CModules::OnClientDisconnect() { MODUNLOADCHK(OnClientDisconnect()); return false; }
bool CModules::OnUserRaw(CString& sLine) { MODHALTCHK(OnUserRaw(sLine)); }
bool CModules::OnUserCTCPReply(CString& sTarget, CString& sMessage) { MODHALTCHK(OnUserCTCPReply(sTarget, sMessage)); }
bool CModules::OnUserCTCP(CString& sTarget, CString& sMessage) { MODHALTCHK(OnUserCTCP(sTarget, sMessage)); }
@@ -635,6 +636,10 @@ bool CGlobalModules::OnDeleteUser(CUser& User) {
GLOBALMODHALTCHK(OnDeleteUser(User));
}
void CGlobalModules::OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort) {
GLOBALMODCALL(OnClientConnect(pClient, sHost, uPort));
}
bool CGlobalModules::OnLoginAttempt(CSmartPtr<CAuthBase> Auth) {
GLOBALMODHALTCHK(OnLoginAttempt(Auth));
}