]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
m_spanningtree Remove SpanningTreeUtilities* fields and parameters
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index 2063628451fb227def141a51e988cc09bf860caa..cf8da5f5532bbdc05aec9db6dc9b5eb368a9aef7 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides channel mode +T to block notices to the channel */
-
 class NoNotice : public SimpleChannelModeHandler
 {
  public:
@@ -42,8 +40,6 @@ class ModuleNoNotice : public Module
        void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(nt);
-               Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
@@ -57,7 +53,7 @@ class ModuleNoNotice : public Module
                if ((msgtype == MSG_NOTICE) && (target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        Channel* c = (Channel*)dest;
-                       if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet('T')))
+                       if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet(nt)))
                        {
                                res = ServerInstance->OnCheckExemption(user,c,"nonotice");
                                if (res == MOD_RES_ALLOW)