mirror of
https://github.com/znc/znc.git
synced 2026-05-04 12:32:33 +02:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user