summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-27 17:19:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-27 17:19:28 +0000
commit439cff2dc8683bbd4005c3456ee6c9f1f3236224 (patch)
tree5cf7431ab9d524742194937cae74945fadc08ef0
parentee3a514fe2e12ec326b4505e6c5bec19f074a899 (diff)
Add OnBuildExemptList, which is used to build an exempt list when passing a privmsg on, but not directly processing it (m_spanningtree etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5818 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h9
-rw-r--r--src/cmd_modules.cpp2
-rw-r--r--src/modules.cpp1
3 files changed, 10 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index b1b682801..c6ea35104 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -358,7 +358,7 @@ enum Implementation { I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUse
I_OnPostLocalTopicChange, I_OnEvent, I_OnRequest, I_OnOperCompre, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
I_OnOperCompare, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList,
- I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine };
+ I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList };
/** Base class for all InspIRCd modules
* This class is the base class for InspIRCd modules. All modules must inherit from this class,
@@ -637,6 +637,13 @@ class Module : public Extensible
* @return 1 to deny the NOTICE, 0 to allow it
*/
virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text,char status, CUList &exempt_list);
+
+ /** Called whenever the server wants to build the exemption list for a channel, but is not directly doing a PRIVMSG or NOTICE.
+ * For example, the spanningtree protocol will call this event when passing a privmsg on (but not processing it directly).
+ * @param chan The channel to build the exempt list of
+ * @param exempt_list The exempt list to be populated
+ */
+ virtual void OnBuildExemptList(chanrec* chan, CUList &exempt_list);
/** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
* Please note that although you can see remote nickchanges through this function, you should
diff --git a/src/cmd_modules.cpp b/src/cmd_modules.cpp
index 767693435..56df9cc60 100644
--- a/src/cmd_modules.cpp
+++ b/src/cmd_modules.cpp
@@ -34,7 +34,7 @@ char* itab[] = {
"OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnPostConnect", "OnAddBan", "OnDelBan",
"OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister",
"OnOperCompare", "OnChannelDelete", "OnPostOper", "OnSyncOtherMetaData", "OnSetAway", "OnCancelAway", "OnNamesList",
- "OnPostCommand", "OnPostJoin", "OnWhoisLine", NULL
+ "OnPostCommand", "OnPostJoin", "OnWhoisLine", "OnBuildExemptList", NULL
};
extern "C" command_t* init_command(InspIRCd* Instance)
diff --git a/src/modules.cpp b/src/modules.cpp
index 454268964..a11bdd772 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -192,6 +192,7 @@ void Module::OnSetAway(userrec* user) { };
void Module::OnCancelAway(userrec* user) { };
int Module::OnUserList(userrec* user, chanrec* Ptr) { return 0; };
int Module::OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text) { return 0; };
+void Module::OnBuildExemptList(chanrec* chan, CUList &exempt_list) { };
long InspIRCd::PriorityAfter(const std::string &modulename)
{