]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcolor.cpp
Import the anticaps module from inspircd-extras.
[user/henk/code/inspircd.git] / src / modules / m_blockcolor.cpp
index e3135185d2e63b55ec73599ff0f073c6b97c1433..43d0826dd7138954b28f61acb66d5bc00008bcd9 100644 (file)
@@ -41,11 +41,11 @@ class ModuleBlockColor : public Module
                tokens["EXTBAN"].push_back('c');
        }
 
-       ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE
+       ModResult OnUserPreMessage(User* user, const MessageTarget& target, MessageDetails& details) CXX11_OVERRIDE
        {
-               if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
+               if ((target.type == MessageTarget::TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
-                       Channel* c = (Channel*)dest;
+                       Channel* c = target.Get<Channel>();
                        ModResult res = CheckExemption::Call(exemptionprov, user, c, "blockcolor");
 
                        if (res == MOD_RES_ALLOW)
@@ -53,7 +53,7 @@ class ModuleBlockColor : public Module
 
                        if (!c->GetExtBanStatus(user, 'c').check(!c->IsModeSet(bc)))
                        {
-                               for (std::string::iterator i = text.begin(); i != text.end(); i++)
+                               for (std::string::iterator i = details.text.begin(); i != details.text.end(); i++)
                                {
                                        switch (*i)
                                        {