mod_register: Use throttle_max as indicator of limits being enabled, in case min_seconds_between_registrations is not used
--- a/plugins/mod_register.lua Wed Nov 02 13:08:12 2016 +0100
+++ b/plugins/mod_register.lua Wed Nov 02 13:30:45 2016 +0100
@@ -230,7 +230,7 @@
elseif blacklisted_ips[session.ip] or (whitelist_only and not whitelisted_ips[session.ip]) then
session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account."));
return true;
- elseif min_seconds_between_registrations and not whitelisted_ips[session.ip] then
+ elseif throttle_max and not whitelisted_ips[session.ip] then
if not check_throttle(session.ip) then
log("debug", "Registrations over limit for ip %s", session.ip or "?");
session.send(st.error_reply(stanza, "wait", "not-acceptable"));