# HG changeset patch # User Kim Alvefur # Date 1520644883 -3600 # Node ID 9918f324a0bed39c27466f03111c44150f2c5ac7 # Parent 6a2366759974c51a54b33c603a466eb9b9ca012f mod_register_ibr: Include reason for rejection of registration in debug log diff -r 6a2366759974 -r 9918f324a0be plugins/mod_register_ibr.lua --- a/plugins/mod_register_ibr.lua Sat Mar 10 00:08:21 2018 +0100 +++ b/plugins/mod_register_ibr.lua Sat Mar 10 02:21:23 2018 +0100 @@ -146,7 +146,7 @@ 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"); + log("debug", "Registration disallowed by module: %s", user.reason or "no reason given"); session.send(st.error_reply(stanza, "modify", "not-acceptable", user.reason)); elseif usermanager_user_exists(username, host) then log("debug", "Attempt to register with existing username");