summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf/modules.conf.example5
-rw-r--r--src/modules/m_joinflood.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index a1bd05670..5db819557 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -1271,11 +1271,16 @@
# duration: The number of seconds to close a channel for when it is
# being flooded with joins.
#
+# bootwait: The number of seconds to disengage joinflood for after
+# a server boots. This allows users to reconnect without
+# being throttled by joinflood.
+#
# splitwait: The number of seconds to disengage joinflood for after
# a server splits. This allows users to reconnect without
# being throttled by joinflood.
#
#<joinflood duration="1m"
+# bootwait="30s"
# splitwait="30s">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index e5af2a4c6..28b12a086 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -139,6 +139,7 @@ class ModuleJoinFlood
private:
JoinFlood jf;
time_t ignoreuntil;
+ unsigned long bootwait;
unsigned long splitwait;
public:
@@ -156,7 +157,10 @@ class ModuleJoinFlood
{
ConfigTag* tag = ServerInstance->Config->ConfValue("joinflood");
duration = tag->getDuration("duration", 60, 10, 600);
+ bootwait = tag->getDuration("bootwait", 30);
splitwait = tag->getDuration("splitwait", 30);
+
+ ignoreuntil = ServerInstance->startup_time + bootwait;
}
void OnServerSplit(const Server* server, bool error) CXX11_OVERRIDE