]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chancreate.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_chancreate.cpp
index 0cd9a5f037a406919f820663b26038641815b4d7..232d55314d3c7e809e0728751999e158b2c24e32 100644 (file)
  * ---------------------------------------------------
  */
 
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
-
 #include "inspircd.h"
 
 /* $ModDesc: Creates a snomask with notices whenever a new channel is created */
@@ -24,7 +20,7 @@ class ModuleChanCreate : public Module
  private:
  public:
        ModuleChanCreate(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                ServerInstance->SNO->EnableSnomask('j', "CHANCREATE");
        }
@@ -44,7 +40,7 @@ class ModuleChanCreate : public Module
                List[I_OnUserJoin] = 1;
        }
        
-       virtual void OnUserJoin(userrec* user, chanrec* channel)
+       virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent)
        {
                if (channel->GetUserCounter() == 1)
                {
@@ -53,26 +49,4 @@ class ModuleChanCreate : public Module
        }
 };
 
-class ModuleChanCreateFactory : public ModuleFactory
-{
- public:
-       ModuleChanCreateFactory()
-       {
-       }
-       
-       ~ModuleChanCreateFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleChanCreate(Me);
-       }
-       
-};
-
-extern "C" void * init_module( void )
-{
-       return new ModuleChanCreateFactory;
-}
-
+MODULE_INIT(ModuleChanCreate)