]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_censor.cpp
Remote server PRIVMSG/NOTICE to nickname support
[user/henk/code/inspircd.git] / src / modules / m_censor.cpp
index 94ac8d113bacdc0518459afcdecfd678917ee11b..b4746d93660beeb2e6583c38b9f4a406cdaa82a8 100644 (file)
@@ -140,7 +140,14 @@ class ModuleCensor : public Module
                if (target_type == TYPE_USER)
                        active = ((User*)dest)->IsModeSet('G');
                else if (target_type == TYPE_CHANNEL)
+               {
                        active = ((Channel*)dest)->IsModeSet('G');
+                       Channel* c = (Channel*)dest;
+                       if (CHANOPS_EXEMPT(ServerInstance, 'G') && c->GetStatus(user) == STATUS_OP)
+                       {
+                               return 0;
+                       }
+               }
 
                if (!active)
                        return 0;
@@ -152,7 +159,7 @@ class ModuleCensor : public Module
                        {
                                if (index->second.empty())
                                {
-                                       user->WriteServ("936 %s %s %s :Your message contained a censored word, and was blocked", user->nick, ((Channel*)dest)->name, index->first.c_str());
+                                       user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked", user->nick, ((Channel*)dest)->name, index->first.c_str());
                                        return 1;
                                }
                                
@@ -189,7 +196,7 @@ class ModuleCensor : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
+               return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
        }
        
 };