diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-13 22:10:57 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-13 22:10:57 +0000 |
commit | 32be456c07972a289ebbf8db99b88a591e963235 (patch) | |
tree | 59644e48d23de5f4aa442253da53a4a8ef7cf5fd /src/modules/m_blockcolor.cpp | |
parent | 763deccf122440ed8ea876ac53e0a6198b38240e (diff) |
Replace strip/blockcolor tags with <options:exemptchanops>, sexy string of modes to exempt chanops from (currently Sc are supported).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7018 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_blockcolor.cpp')
-rw-r--r-- | src/modules/m_blockcolor.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index a40d4ebd3..219637fb9 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -61,23 +61,14 @@ class ModuleBlockColour : public Module bc = new BlockColor(ServerInstance); if (!ServerInstance->AddMode(bc, 'c')) throw ModuleException("Could not add new modes!"); - - OnRehash(NULL, ""); } void Implements(char* List) { - List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; + List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - virtual void OnRehash(userrec* user, const std::string ¶meter) - { - ConfigReader Conf(ServerInstance); - - AllowChanOps = Conf.ReadFlag("blockcolor", "allowchanops", 0); - } - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) @@ -86,7 +77,7 @@ class ModuleBlockColour : public Module if(c->IsModeSet('c')) { - if (!AllowChanOps || AllowChanOps && c->GetStatus(user) != STATUS_OP) + if (!CHANOPS_EXEMPT(ServerInstance, 'c') || CHANOPS_EXEMPT(ServerInstance, 'c') && c->GetStatus(user) != STATUS_OP) { for (std::string::iterator i = text.begin(); i != text.end(); i++) { |