Software /
code /
prosody
Changeset
8464:1a0b76b07b7a
mod_register: Include the session and its IP address in user-registering event, so that plugins can use this
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Dec 2017 19:39:43 +0100 |
parents | 8463:d81ebb1ef5ce |
children | 8467:7269313c1324 |
files | plugins/mod_register.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_register.lua Tue Dec 05 13:24:28 2017 +0100 +++ b/plugins/mod_register.lua Fri Dec 08 19:39:43 2017 +0100 @@ -274,7 +274,7 @@ 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");