Software / code / prosody
Comparison
plugins/mod_register.lua @ 7037:5d52e4ee2ae1
mod_register: Fix typo
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 01 Jan 2016 19:53:45 +0100 |
| parent | 7027:77d838ba91c6 |
| child | 7293:c4af754d1e1b |
comparison
equal
deleted
inserted
replaced
| 7035:085a286e2873 | 7037:5d52e4ee2ae1 |
|---|---|
| 178 local blacklisted_ips = module:get_option_set("registration_blacklist", {})._items; | 178 local blacklisted_ips = module:get_option_set("registration_blacklist", {})._items; |
| 179 | 179 |
| 180 local throttle_max = module:get_option_number("registration_throttle_max", min_seconds_between_registrations and 1); | 180 local throttle_max = module:get_option_number("registration_throttle_max", min_seconds_between_registrations and 1); |
| 181 local throttle_period = module:get_option_number("registration_throttle_period", min_seconds_between_registrations); | 181 local throttle_period = module:get_option_number("registration_throttle_period", min_seconds_between_registrations); |
| 182 local throttle_cache_size = module:get_option_number("registration_throttle_cache_size", 100); | 182 local throttle_cache_size = module:get_option_number("registration_throttle_cache_size", 100); |
| 183 local blacklist_overflow = module_get_option_boolean("blacklist_on_registration_throttle_overload", false); | 183 local blacklist_overflow = module:get_option_boolean("blacklist_on_registration_throttle_overload", false); |
| 184 | 184 |
| 185 local throttle_cache = new_cache(throttle_cache_size, blacklist_overflow and function (ip, throttle) | 185 local throttle_cache = new_cache(throttle_cache_size, blacklist_overflow and function (ip, throttle) |
| 186 if not throttle:peek() then | 186 if not throttle:peek() then |
| 187 module:log("info", "Adding ip %s to registration blacklist", ip); | 187 module:log("info", "Adding ip %s to registration blacklist", ip); |
| 188 blacklisted_ips[ip] = true; | 188 blacklisted_ips[ip] = true; |