# HG changeset patch # User Kim Alvefur # Date 1478089845 -3600 # Node ID 08f5b483ff00098c86f5d864842d0dded5a7302e # Parent 0af1783d159232a4e670b096728c92644c738f9e mod_register: Use throttle_max as indicator of limits being enabled, in case min_seconds_between_registrations is not used diff -r 0af1783d1592 -r 08f5b483ff00 plugins/mod_register.lua --- 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"));