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

@@ -688,7 +688,7 @@ void CIRCSock::ReadLine(const CString& sData) {
} else if (sSubCmd == "ACK") {
sArgs.Trim();
m_ssPendingCaps.erase(sArgs);
MODULECALL(OnServerCapAccepted(sArgs), m_pUser, NULL, );
MODULECALL(OnServerCapResult(sArgs, true), m_pUser, NULL, );
if ("multi-prefix" == sArgs) {
m_bNamesx = true;
} else if ("userhost-in-names" == sArgs) {
@@ -700,7 +700,7 @@ void CIRCSock::ReadLine(const CString& sData) {
// capability with length of name more than 100 characters.
sArgs.Trim();
m_ssPendingCaps.erase(sArgs);
MODULECALL(OnServerCapRejected(sArgs), m_pUser, NULL, );
MODULECALL(OnServerCapResult(sArgs, false), m_pUser, NULL, );
}
if (m_ssPendingCaps.empty()) {