Software /
code /
prosody-modules
Changeset
2922:9f60905406ba
mod_register_web: Include IP address in pre-registration check event to allow other modules a chance to act on it
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Mar 2018 02:38:42 +0100 |
parents | 2921:3264058ae54f |
children | 2923:9d53134a0b29 |
files | mod_register_web/mod_register_web.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_register_web/mod_register_web.lua Sat Mar 10 00:49:06 2018 +0100 +++ b/mod_register_web/mod_register_web.lua Sat Mar 10 02:38:42 2018 +0100 @@ -124,7 +124,7 @@ if usermanager.user_exists(prepped_username, module.host) then return nil, "Username already taken"; end - local registering = { username = prepped_username , host = module.host, allowed = true } + local registering = { username = prepped_username , host = module.host, ip = origin.conn:ip(), allowed = true } module:fire_event("user-registering", registering); if not registering.allowed then return nil, "Registration not allowed";