summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-02 06:22:29 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-02 06:22:29 +0000
commit484a50996008239ce69a89d6639bdcd1318cd54f (patch)
treefe84f677c516624124354c09d2755ba485398a50
parent60ed3083f49c93c93c9452a33a2ea1547ab9e16c (diff)
Fixed a bug in m_connflood that caused the bootwait value to have no effect
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6478 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_connflood.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp
index 40d64520f..c834605b0 100644
--- a/src/modules/m_connflood.cpp
+++ b/src/modules/m_connflood.cpp
@@ -70,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;