]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Convert more modules
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index 048756b6d20290261f2c6aaa1c602667432e1c50..1cacef956edb8f785c2ed386c427dccffb43e83a 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 the SETHOST command */
 
 /** Handle /SETHOST
@@ -67,9 +64,9 @@ class ModuleSetHost : public Module
        char hostmap[256];
  public:
        ModuleSetHost(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {       
-               OnRehash("");
+               OnRehash(NULL,"");
                mycommand = new cmd_sethost(ServerInstance, hostmap);
                ServerInstance->AddCommand(mycommand);
        }
@@ -79,7 +76,7 @@ class ModuleSetHost : public Module
                List[I_OnRehash] = 1;
        }
 
-       void OnRehash(const std::string &parameter)
+       void OnRehash(userrec* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
                std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
@@ -122,7 +119,7 @@ class ModuleSetHostFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleSetHostFactory;
 }