Reduce number of module hooks

The new hooks OnServerCapAccepted() and OnServerCapRejected() are replaced by
OnServerCapResult(). This should force people who want to use this to handle
possible failures in requesting the capability.

Again, thanks to DarthGandalf for the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2100 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-08-05 12:13:44 +00:00
parent 83db7684f2
commit a3bc3f6877
3 changed files with 10 additions and 15 deletions

View File

@@ -456,8 +456,7 @@ CModule::EModRet CModule::OnTopic(CNick& Nick, CChan& Channel, CString& sTopic)
CModule::EModRet CModule::OnTimerAutoJoin(CChan& Channel) { return CONTINUE; }
bool CModule::OnServerCapAvailable(const CString& sCap) { return false; }
void CModule::OnServerCapAccepted(const CString& sCap) {}
void CModule::OnServerCapRejected(const CString& sCap) {}
void CModule::OnServerCapResult(const CString& sCap, bool bSuccess) {}
bool CModule::PutIRC(const CString& sLine) {
return (m_pUser) ? m_pUser->PutIRC(sLine) : false;
@@ -628,8 +627,7 @@ bool CModules::OnServerCapAvailable(const CString& sCap) {
return bResult;
}
bool CModules::OnServerCapAccepted(const CString& sCap) { MODUNLOADCHK(OnServerCapAccepted(sCap)); return false; }
bool CModules::OnServerCapRejected(const CString& sCap) { MODUNLOADCHK(OnServerCapRejected(sCap)); return false; }
bool CModules::OnServerCapResult(const CString& sCap, bool bSuccess) { MODUNLOADCHK(OnServerCapResult(sCap, bSuccess)); return false; }
////////////////////
// CGlobalModules //