]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hostchange.cpp
and a little tweak to remote MOTD too.
[user/henk/code/inspircd.git] / src / modules / m_hostchange.cpp
index 4de6a82029138b8c99b34b7cb9f8aeacca703238..d8f0aaf599bc1b9b06385c0646b5a089fb8350d3 100644 (file)
@@ -2,25 +2,19 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
-#include <stdio.h>
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "inspircd.h"
 
 /* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */
 
@@ -46,11 +40,10 @@ class ModuleHostChange : public Module
         
  public:
        ModuleHostChange(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
-               
                Conf = new ConfigReader(ServerInstance);
-               OnRehash("");
+               OnRehash(NULL,"");
        }
        
        virtual ~ModuleHostChange()
@@ -68,7 +61,7 @@ class ModuleHostChange : public Module
                List[I_OnRehash] = List[I_OnUserConnect] = 1;
        }
 
-       virtual void OnRehash(const std::string &parameter)
+       virtual void OnRehash(userrec* user, const std::string &parameter)
        {
                DELETE(Conf);
                Conf = new ConfigReader(ServerInstance);
@@ -94,7 +87,7 @@ class ModuleHostChange : public Module
        {
                // returns the version number of the module to be
                // listed in /MODULES
-               return Version(1,0,0,1,VF_VENDOR);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
        
        virtual void OnUserConnect(userrec* user)
@@ -166,7 +159,7 @@ class ModuleHostChangeFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleHostChangeFactory;
 }