aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-08 19:39:43 +0100
committerKim Alvefur <zash@zash.se>2017-12-08 19:39:43 +0100
commite368ce5bdb24008282fea4e3a3e2c58ba2889bfb (patch)
treeca3f01bf0171c53a964ec2b01ee75d8b5dcb625e /plugins
parente0ffb3ab1bedbbab2c9fff429f0866ebce678a52 (diff)
downloadprosody-e368ce5bdb24008282fea4e3a3e2c58ba2889bfb.tar.gz
prosody-e368ce5bdb24008282fea4e3a3e2c58ba2889bfb.zip
mod_register: Include the session and its IP address in user-registering event, so that plugins can use this
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register.lua2
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");