diff options
author | Sadie Powell <sadie@witchery.services> | 2020-10-12 18:47:21 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-10-12 18:47:21 +0100 |
commit | b521739c93116f31b63c2c8013b30b7b024391d3 (patch) | |
tree | 6361d9c6d38aa33b4e76c8f3c19492a05251abea | |
parent | 2a3b6ba9e24067d5c085c555a1acb2c4dc9bc5f2 (diff) |
Add an option to allow disengaging joinflood on initial boot.
-rw-r--r-- | docs/conf/modules.conf.example | 5 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 4 |
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 |