]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_conn_umodes.cpp
Add config <options:disablehmac> to support disabling of HMAC, and tidy up to detect...
[user/henk/code/inspircd.git] / src / modules / m_conn_umodes.cpp
index 7551d32f30b5459f068789339595a240c325c1b2..2226f9776c7b0ce503c34ef727d3b1a102cf77fd 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 <vector>
 #include "users.h"
@@ -45,7 +40,7 @@ class ModuleModesOnConnect : public Module
                List[I_OnPostConnect] = 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);
@@ -58,7 +53,7 @@ class ModuleModesOnConnect : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_VENDOR);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
        
        virtual void OnPostConnect(userrec* user)
@@ -66,13 +61,11 @@ class ModuleModesOnConnect : public Module
                if (!IS_LOCAL(user))
                        return;
 
-               ServerInstance->Log(DEBUG,"Post connect for mode setting");
                for (int j = 0; j < Conf->Enumerate("connect"); j++)
                {
                        std::string hostn = Conf->ReadValue("connect","allow",j);
                        if ((match(user->GetIPString(),hostn.c_str(),true)) || (match(user->host,hostn.c_str())))
                        {
-                               ServerInstance->Log(DEBUG,"Found matching connect block '%s'",hostn.c_str());
                                std::string ThisModes = Conf->ReadValue("connect","modes",j);
                                if (ThisModes != "")
                                {
@@ -101,7 +94,7 @@ class ModuleModesOnConnect : public Module
                                                }
                                        }
 
-                                       ServerInstance->SendMode(modes, size, user);
+                                       ServerInstance->Parser->CallHandler("MODE", modes, size, user);
                                }
                                break;
                        }