diff options
author | Peter Powell <petpow@saberuk.com> | 2018-04-14 14:59:35 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-16 15:24:49 +0100 |
commit | 2d36fcb16ef3209fffbe9f4b600971a1edd2ae4b (patch) | |
tree | 4e8f371548bfbc844ad7db42b775db847b141636 /src/modules/m_connflood.cpp | |
parent | ccab908f14804776aab4c6728710e89b4847130a (diff) |
Convert ConfigTag::getDuration to return an unsigned long.
Diffstat (limited to 'src/modules/m_connflood.cpp')
-rw-r--r-- | src/modules/m_connflood.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index 29d4d9d3a..32d36188b 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -23,7 +23,9 @@ class ModuleConnFlood : public Module { - int seconds, timeout, boot_wait; + unsigned int seconds; + unsigned int timeout; + unsigned int boot_wait; unsigned int conns; unsigned int maxconns; bool throttled; @@ -46,13 +48,13 @@ public: /* read configuration variables */ ConfigTag* tag = ServerInstance->Config->ConfValue("connflood"); /* throttle configuration */ - seconds = tag->getDuration("period", tag->getInt("seconds", 30)); + seconds = tag->getDuration("period", tag->getDuration("seconds", 30)); maxconns = tag->getInt("maxconns", 3); timeout = tag->getDuration("timeout", 30); quitmsg = tag->getString("quitmsg"); /* seconds to wait when the server just booted */ - boot_wait = tag->getInt("bootwait", 10); + boot_wait = tag->getDuration("bootwait", 10); first = ServerInstance->Time(); } |