]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sanick.cpp
Add VF_COMMON to a lot modules which require it. Reported by danielg in bug #369...
[user/henk/code/inspircd.git] / src / modules / m_sanick.cpp
index 43cb9e6daa1755e2909113bd59f2bed4f6e97bee..02f0c3fa5c10f7b73b24912d9f13acb5d0282ca6 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <stdio.h>
-#include <string>
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "inspircd.h"
 
 /* $ModDesc: Provides support for SANICK command */
 
@@ -78,7 +76,7 @@ class ModuleSanick : public Module
        cmd_sanick*     mycommand;
  public:
        ModuleSanick(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                
                mycommand = new cmd_sanick(ServerInstance);
@@ -91,34 +89,9 @@ class ModuleSanick : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1, 1, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
        
 };
 
-// stuff down here is the module-factory stuff. For basic modules you can ignore this.
-
-class ModuleSanickFactory : public ModuleFactory
-{
- public:
-       ModuleSanickFactory()
-       {
-       }
-       
-       ~ModuleSanickFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleSanick(Me);
-       }
-       
-};
-
-
-extern "C" void * init_module( void )
-{
-       return new ModuleSanickFactory;
-}
-
+MODULE_INIT(ModuleSanick)