]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_inviteexception.cpp
Add sanity checks to the ssl modules so that theres no possibility of an out of range...
[user/henk/code/inspircd.git] / src / modules / m_inviteexception.cpp
index 8cca13b1e95f72573d21af91bf29f4520e20fd9c..c689af32054fb5f3a688efce5b77866436bb6c8a 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <string>
-#include <vector>
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-#include "mode.h"
+#include "inspircd.h"
 #include "u_listmode.h"
 
 /* $ModDesc: Provides support for the +I channel mode */
@@ -51,7 +46,7 @@ public:
                ie = new InviteException(ServerInstance);
                if (!ServerInstance->AddMode(ie, 'I'))
                        throw ModuleException("Could not add new modes!");
-               ServerInstance->PublishInterface("ChannelBanList", this);
+               ServerInstance->Modules->PublishInterface("ChannelBanList", this);
        }
 
        virtual void Implements(char* List)
@@ -144,31 +139,8 @@ public:
        {
                ServerInstance->Modes->DelMode(ie);
                DELETE(ie);
-               ServerInstance->UnpublishInterface("ChannelBanList", this);
+               ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
        }
 };
 
-
-class ModuleInviteExceptionFactory : public ModuleFactory
-{
- public:
-       ModuleInviteExceptionFactory()
-       {
-       }
-       
-       ~ModuleInviteExceptionFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleInviteException(Me);
-       }
-       
-};
-
-
-extern "C" void * init_module( void )
-{
-       return new ModuleInviteExceptionFactory;
-}
+MODULE_INIT(ModuleInviteException)