]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banexception.cpp
dz is determined to crash your ircd :P
[user/henk/code/inspircd.git] / src / modules / m_banexception.cpp
index 5dd406e54fbe5e395a2dcd7b494389bb074c602e..4f36fb8c9f0cb84e8e2f9fea26bd4aef5999b6f5 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "mode.h"
 #include "u_listmode.h"
 #include "wildcard.h"
 
@@ -52,7 +48,7 @@ public:
                be = new BanException(ServerInstance);
                if (!ServerInstance->AddMode(be, 'e'))
                        throw ModuleException("Could not add new modes!");
-               ServerInstance->PublishInterface("ChannelBanList", this);
+               ServerInstance->Modules->PublishInterface("ChannelBanList", this);
        }
        
        virtual void Implements(char* List)
@@ -145,31 +141,9 @@ public:
        virtual ~ModuleBanException()
        {
                ServerInstance->Modes->DelMode(be);
-               DELETE(be);
-               ServerInstance->UnpublishInterface("ChannelBanList", this);
+               delete be;
+               ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
        }
 };
 
-class ModuleBanExceptionFactory : public ModuleFactory
-{
- public:
-       ModuleBanExceptionFactory()
-       {
-       }
-       
-       ~ModuleBanExceptionFactory()
-       {
-       }
-       
-       virtual Module* CreateModule(InspIRCd* Me)
-       {
-               return new ModuleBanException(Me);
-       }
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleBanExceptionFactory;
-}
-
+MODULE_INIT(ModuleBanException)