+local throttle_max = module:get_option_number("registration_throttle_max", min_seconds_between_registrations and 1);
+local throttle_period = module:get_option_number("registration_throttle_period", min_seconds_between_registrations);
+
+local function check_throttle(ip)
+ if not throttle_max then return true end
+ local throttle = recent_ips[ip];
+ if not throttle then
+ throttle = create_throttle(throttle_max, throttle_period);
+ recent_ips[ip] = throttle;
+ end
+ return throttle:poll(1);
+end
+