summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-12 18:12:48 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-12 18:12:48 +0000
commit579e707f017ca237d260165992f0b72bafba152c (patch)
tree3e3b6d77b90b505def180fec1dc3c040a00a4871 /include
parent480a798dbdafca245403ad357f5dba2aa4f73261 (diff)
m_exemptchanops by jackmcbarn - channel mode +X to allow per-channel setting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11855 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h12
-rw-r--r--include/modules.h8
2 files changed, 7 insertions, 13 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 893259b7c..bc5a09f02 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -14,13 +14,6 @@
#ifndef INSPIRCD_CONFIGREADER
#define INSPIRCD_CONFIGREADER
-/* handy defines */
-
-/** Determines if a channel op is exempt from given mode m,
- * in config of server instance s.
- */
-#define CHANOPS_EXEMPT(m) (ServerInstance->Config->ExemptChanOps[(unsigned char)m])
-
#include <sstream>
#include <string>
#include <vector>
@@ -385,11 +378,6 @@ class CoreExport ServerConfig : public classbase
*/
bool HideModeLists[256];
- /** If this is set to true, then channel operators
- * are exempt from this channel mode. Used for +Sc etc.
- */
- bool ExemptChanOps[256];
-
/** The number of seconds the DNS subsystem
* will wait before timing out any request.
*/
diff --git a/include/modules.h b/include/modules.h
index 972dabb43..0a1c759e5 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -341,7 +341,7 @@ enum Implementation
I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin,
I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect,
I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookIO,
- I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent,
+ I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent, I_OnChannelRestrictionApply,
I_END
};
@@ -1279,6 +1279,12 @@ class CoreExport Module : public Extensible
* @param line The raw line to send; modifiable, if empty no line will be returned.
*/
virtual void OnSendWhoLine(User* source, User* user, Channel* channel, std::string& line);
+
+ /** Called to check whether a channel restriction mode applies to a user on it
+ * @return MOD_RES_DENY to apply the restriction, MOD_RES_ALLOW to bypass
+ * the restriction, or MOD_RES_PASSTHRU to check restriction status normally
+ */
+ virtual ModResult OnChannelRestrictionApply(Membership* memb, Channel* chan, const char* restriction);
};