Add OnJoining module hook.

This patch adds an OnJoining module hook that allows a module to allow
or disallow joining any given channel.
This commit is contained in:
Alexander Færøy
2014-05-29 17:56:04 +02:00
parent 5d001cd0e0
commit db0e0995e2
9 changed files with 22 additions and 0 deletions
+6
View File
@@ -567,6 +567,11 @@ public:
* @param sMessage The kick message.
*/
virtual void OnKick(const CNick& OpNick, const CString& sKickedNick, CChan& Channel, const CString& sMessage);
/** This module hook is called just before ZNC tries to join an IRC channel.
* @param Chan The channel which is about to get joined.
* @return See CModule::EModRet.
*/
virtual EModRet OnJoining(CChan& Channel);
/** Called when a nick joins a channel.
* @param Nick The nick who joined.
* @param Channel The channel which was joined.
@@ -1112,6 +1117,7 @@ public:
bool OnQuit(const CNick& Nick, const CString& sMessage, const std::vector<CChan*>& vChans);
bool OnNick(const CNick& Nick, const CString& sNewNick, const std::vector<CChan*>& vChans);
bool OnKick(const CNick& Nick, const CString& sOpNick, CChan& Channel, const CString& sMessage);
bool OnJoining(CChan& Channel);
bool OnJoin(const CNick& Nick, CChan& Channel);
bool OnPart(const CNick& Nick, CChan& Channel, const CString& sMessage);
bool OnInvite(const CNick& Nick, const CString& sChan);