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;
/* read configuration variables */
ConfigTag* tag = ServerInstance->Config->ConfValue("connflood");
/* throttle configuration */
- seconds = tag->getInt("seconds");
- maxconns = tag->getInt("maxconns");
- timeout = tag->getInt("timeout");
+ seconds = tag->getDuration("period", tag->getDuration("seconds", 30));
+ maxconns = tag->getUInt("maxconns", 3);
+ timeout = tag->getDuration("timeout", 30);
quitmsg = tag->getString("quitmsg");
/* seconds to wait when the server just booted */
- boot_wait = tag->getInt("bootwait");
+ boot_wait = tag->getDuration("bootwait", 10);
first = ServerInstance->Time();
}