mirror of
https://github.com/znc/znc.git
synced 2026-08-10 10:52:59 +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:
@@ -644,14 +644,12 @@ public:
|
||||
* needs to turn it on with CAP REQ.
|
||||
*/
|
||||
virtual bool OnServerCapAvailable(const CString& sCap);
|
||||
/** Called for every CAP accepted by server (with CAP ACK after our CAP REQ).
|
||||
* @param sCap capability accepted by server.
|
||||
/** Called for every CAP accepted or rejected by server
|
||||
* (with CAP ACK or CAP NAK after our CAP REQ).
|
||||
* @param sCap capability accepted/rejected by server.
|
||||
* @param sSuccess true if capability was accepted, false if rejected.
|
||||
*/
|
||||
virtual void OnServerCapAccepted(const CString& sCap);
|
||||
/** Called for every CAP rejected by server (with CAP NAK after our CAP REQ).
|
||||
* @param sCap capability rejected by server.
|
||||
*/
|
||||
virtual void OnServerCapRejected(const CString& sCap);
|
||||
virtual void OnServerCapResult(const CString& sCap, bool bSuccess);
|
||||
|
||||
/** This module hook is called just before ZNC tries to join a channel
|
||||
* by itself because it's in the config but wasn't joined yet.
|
||||
@@ -884,8 +882,7 @@ public:
|
||||
bool OnTimerAutoJoin(CChan& Channel);
|
||||
|
||||
bool OnServerCapAvailable(const CString& sCap);
|
||||
bool OnServerCapAccepted(const CString& sCap);
|
||||
bool OnServerCapRejected(const CString& sCap);
|
||||
bool OnServerCapResult(const CString& sCap, bool bSuccess);
|
||||
|
||||
CModule* FindModule(const CString& sModule) const;
|
||||
bool LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg);
|
||||
|
||||
Reference in New Issue
Block a user