]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_remove.cpp
Fix new millisec /map to compile on windows, by ifndef gettimeofday out reverting...
[user/henk/code/inspircd.git] / src / modules / m_remove.cpp
index e5c433b8437b4f647e3640454f62d2113dd8a221..fcd6ae9586147aeb117cdb2eb86b19638db27b9e 100644 (file)
  * ---------------------------------------------------
  */
 
+#include "inspircd.h"
 #include <sstream>
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
 #include "configreader.h"
-#include "inspircd.h"
 
 /* $ModDesc: Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel */
 
@@ -249,7 +249,7 @@ class ModuleRemove : public Module
        
  public:
        ModuleRemove(InspIRCd* Me)
-       : Module::Module(Me)
+       : Module(Me)
        {
                mycommand = new cmd_remove(ServerInstance, supportnokicks);
                mycommand2 = new cmd_fpart(ServerInstance, supportnokicks);
@@ -276,39 +276,13 @@ class ModuleRemove : public Module
        
        virtual ~ModuleRemove()
        {
-               delete mycommand;
-               delete mycommand2;
        }
        
        virtual Version GetVersion()
        {
-               return Version(1,1,1,0,VF_VENDOR,API_VERSION);
-       }
-       
-};
-
-// stuff down here is the module-factory stuff. For basic modules you can ignore this.
-
-class ModuleRemoveFactory : public ModuleFactory
-{
- public:
-       ModuleRemoveFactory()
-       {
-       }
-       
-       ~ModuleRemoveFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleRemove(Me);
+               return Version(1, 1, 1, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
        
 };
 
-
-extern "C" void * init_module( void )
-{
-       return new ModuleRemoveFactory;
-}
+MODULE_INIT(ModuleRemove)