Changeset

7710:08f5b483ff00

mod_register: Use throttle_max as indicator of limits being enabled, in case min_seconds_between_registrations is not used
author Kim Alvefur <zash@zash.se>
date Wed, 02 Nov 2016 13:30:45 +0100
parents 7709:0af1783d1592
children 7711:c8130995d4d1
files plugins/mod_register.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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"));