diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/configreader.h | 12 | ||||
-rw-r--r-- | include/modules.h | 8 |
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); }; |