diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-08 19:39:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-08 19:39:43 +0100 |
commit | 7558a8478a1066f95033b9a760b5e39b98bd1fbb (patch) | |
tree | ca3f01bf0171c53a964ec2b01ee75d8b5dcb625e | |
parent | 5389a3a5cfd741173841344e03ec9195144042df (diff) | |
download | prosody-7558a8478a1066f95033b9a760b5e39b98bd1fbb.tar.gz prosody-7558a8478a1066f95033b9a760b5e39b98bd1fbb.zip |
mod_register: Include the session and its IP address in user-registering event, so that plugins can use this
-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 af38b25f..c17a1fcd 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -274,7 +274,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event) session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid.")); return true; end - local user = { username = username , host = host, additional = data, allowed = true } + local user = { username = username , host = host, additional = data, ip = session.ip, session = session, allowed = true } module:fire_event("user-registering", user); if not user.allowed then log("debug", "Registration disallowed by module"); |