]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_connflood.cpp
To be more specific, specify rpath() macro here
[user/henk/code/inspircd.git] / src / modules / m_connflood.cpp
index a226fa1893e976e53d2df7ff56432d48b4e520cd..c834605b0622419790586676f3269c1ad03be4ef 100644 (file)
@@ -1,23 +1,16 @@
-/*   +------------------------------------+
- *   | Inspire Internet Relay Chat Daemon |
- *   +------------------------------------+
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                    E-mail:
- *             <brain@chatspike.net>
- *             <Craig@chatspike.net>
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- *     --- This module contributed by pippijn ---
- * 
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
- * the file COPYING for details.
+ *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include "users.h"
 #include "modules.h"
 
@@ -77,9 +70,10 @@ public:
        virtual int OnUserRegister(userrec* user)
        {
                time_t next = ServerInstance->Time();
-               if (!first)
-                       first = next - boot_wait;
-
+               
+               if ((ServerInstance->startup_time + boot_wait) > next)
+                       return 0;
+               
                /* time difference between first and latest connection */
                time_t tdiff = next - first;
 
@@ -117,7 +111,7 @@ public:
                return 0;
        }
 
-       virtual void OnRehash(const std::string &parameter)
+       virtual void OnRehash(userrec* user, const std::string &parameter)
        {
                InitConf();
        }