]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_deaf.cpp
Remove unnecessary header traffic
[user/henk/code/inspircd.git] / src / modules / m_deaf.cpp
index 109916881015fc85dec9037bf419c61cbf27f5a6..c7d40115a6bc5769fcc96ed3e0f2217b269d347e 100644 (file)
@@ -11,9 +11,6 @@
  * ---------------------------------------------------
  */
 
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 #include "inspircd.h"
 
 /* $ModDesc: Provides support for ircu style usermode +d (deaf to channel messages and channel notices) */
@@ -108,9 +105,10 @@ class ModuleDeaf : public Module
 
        virtual int PreText(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
-               if ((target_type == TYPE_CHANNEL) & (IS_LOCAL(user)))
+               if (target_type == TYPE_CHANNEL)
                {
                        chanrec* chan = (chanrec*)dest;
+
                        if (chan)
                        {
                                this->OnBuildExemptList(MSG_PRIVMSG, chan, user, status, exempt_list);
@@ -132,28 +130,4 @@ class ModuleDeaf : public Module
 
 };
 
-
-class ModuleDeafFactory : public ModuleFactory
-{
- public:
-       ModuleDeafFactory()
-       {
-       }
-       
-       ~ModuleDeafFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleDeaf(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleDeafFactory;
-}
-
+MODULE_INIT(ModuleDeaf)