Software / code / prosody
Comparison
plugins/mod_register.lua @ 7605:2481ebc7f715
Merge 0.10->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 18 Aug 2016 17:36:46 +0200 |
| parent | 7570:c61ea328fac2 |
| child | 7709:0af1783d1592 |
comparison
equal
deleted
inserted
replaced
| 7604:36408ef6c8c9 | 7605:2481ebc7f715 |
|---|---|
| 224 log("debug", "User's IP not known; can't apply blacklist/whitelist"); | 224 log("debug", "User's IP not known; can't apply blacklist/whitelist"); |
| 225 elseif blacklisted_ips[session.ip] or (whitelist_only and not whitelisted_ips[session.ip]) then | 225 elseif blacklisted_ips[session.ip] or (whitelist_only and not whitelisted_ips[session.ip]) then |
| 226 session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account.")); | 226 session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account.")); |
| 227 return true; | 227 return true; |
| 228 elseif min_seconds_between_registrations and not whitelisted_ips[session.ip] then | 228 elseif min_seconds_between_registrations and not whitelisted_ips[session.ip] then |
| 229 if check_throttle(session.ip) then | 229 if not check_throttle(session.ip) then |
| 230 session.send(st.error_reply(stanza, "wait", "not-acceptable")); | 230 session.send(st.error_reply(stanza, "wait", "not-acceptable")); |
| 231 return true; | 231 return true; |
| 232 end | 232 end |
| 233 end | 233 end |
| 234 local username, password = nodeprep(data.username), data.password; | 234 local username, password = nodeprep(data.username), data.password; |