]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hostchange.cpp
To be more specific, specify rpath() macro here
[user/henk/code/inspircd.git] / src / modules / m_hostchange.cpp
index 1a5986fc27e49dee83582b6a87bd39fe898f4076..473a35d124e9e8a4a5347267d5bd56b241c6595f 100644 (file)
@@ -2,20 +2,15 @@
  *       | 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 "users.h"
 #include "channels.h"
@@ -24,8 +19,8 @@ using namespace std;
 
 /* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */
 
-extern InspIRCd* ServerInstance;
-
+/** Holds information on a host set by m_hostchange
+ */
 class Host : public classbase
 {
  public:
@@ -48,9 +43,8 @@ class ModuleHostChange : public Module
        ModuleHostChange(InspIRCd* Me)
                : Module::Module(Me)
        {
-               
-               Conf = new ConfigReader;
-               OnRehash("");
+               Conf = new ConfigReader(ServerInstance);
+               OnRehash(NULL,"");
        }
        
        virtual ~ModuleHostChange()
@@ -68,10 +62,10 @@ 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;
+               Conf = new ConfigReader(ServerInstance);
                MySuffix = Conf->ReadValue("host","suffix",0);
                for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
                {
@@ -94,7 +88,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)