]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Fixed compile problems... Move along please, nothing to see here..
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 44a03a39b355416e3450f0993a42db68544903bc..7bcfb0af273a86f541d385466bea8746e77db3a8 100644 (file)
@@ -29,7 +29,10 @@ using namespace std;
 // the server->server link, and all encoding of hosts is
 // done locally on the server by this module.
 
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
@@ -268,10 +271,11 @@ class ModuleCloaking : public Module
        }
         
  public:
-       ModuleCloaking()
+       ModuleCloaking(Server* Me)
+               : Module::Module(Me)
        {
-               // We must create an instance of the Server class to work with
-               Srv = new Server;
+               // We must take a copy of the Server class to work with
+               Srv = Me;
                
                // we must create a new mode. Set the parameters so the
                // mode doesn't require oper, and is a client usermode
@@ -291,8 +295,6 @@ class ModuleCloaking : public Module
        
        virtual ~ModuleCloaking()
        {
-               // not really neccessary, but free it anyway
-               delete Srv;
        }
        
        virtual Version GetVersion()
@@ -401,9 +403,9 @@ class ModuleCloakingFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule()
+       virtual Module * CreateModule(Server* Me)
        {
-               return new ModuleCloaking;
+               return new ModuleCloaking(Me);
        }
        
 };