]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_vhost.cpp
We were already sending FMODE +nt after each channel creation to keep services happy...
[user/henk/code/inspircd.git] / src / modules / m_vhost.cpp
index eb6c3e38e151c276d0fc74aac63b52d40e810370..1b32cba3bcead332a33a9c15d43f989bc9c55202 100644 (file)
@@ -2,35 +2,30 @@
  *       | 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 via traditional /VHOST command */
 
-static ConfigReader *Conf;
-
+static ConfigReader* Conf;
 
+/** Handle /VHOST
+ */
 class cmd_vhost : public command_t
 {
  public:
- cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2)
      cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2)
        {
                this->source = "m_vhost.so";
                syntax = "<username> <password>";
@@ -65,7 +60,7 @@ class ModuleVHost : public Module
        cmd_vhost* mycommand;
         
  public:
-       ModuleVHost(InspIRCd* Me) : Module::Module(Me)
+       ModuleVHost(InspIRCd* Me) : Module(Me)
        {
                
                Conf = new ConfigReader(ServerInstance);
@@ -83,7 +78,7 @@ class ModuleVHost : public Module
                List[I_OnRehash] = 1;
        }
 
-       virtual void OnRehash(const std::string &parameter)
+       virtual void OnRehash(userrec* user, const std::string &parameter)
        {
                DELETE(Conf);
                Conf = new ConfigReader(ServerInstance);
@@ -91,9 +86,7 @@ class ModuleVHost : public Module
        
        virtual Version GetVersion()
        {
-               // 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);
        }
        
 };
@@ -119,7 +112,7 @@ class ModuleVHostFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleVHostFactory;
 }