From 579e707f017ca237d260165992f0b72bafba152c Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 12 Oct 2009 18:12:48 +0000 Subject: 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 --- include/configreader.h | 12 ------------ include/modules.h | 8 +++++++- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'include') 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 #include #include @@ -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); }; -- cgit v1.2.3