diff options
author | Kim Alvefur <zash@zash.se> | 2016-11-02 13:30:45 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-11-02 13:30:45 +0100 |
commit | 90569190248a26e3de853703b28855e69e43e251 (patch) | |
tree | cb5372c5f3f00efdb591ed0d826f69378f3f2c49 /plugins | |
parent | a608cc50da05ada72b0eef29ed8112f94b5c2ba2 (diff) | |
download | prosody-90569190248a26e3de853703b28855e69e43e251.tar.gz prosody-90569190248a26e3de853703b28855e69e43e251.zip |
mod_register: Use throttle_max as indicator of limits being enabled, in case min_seconds_between_registrations is not used
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_register.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index 8929529e..12d3c232 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -230,7 +230,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event) 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")); |