Diff

plugins/mod_c2s.lua @ 13642:1b2de94f0580

mod_c2s: Add debug log when disconnecting all user sessions
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Feb 2025 12:40:11 +0000
parent 13575:750ff9f579e2
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Sun Feb 02 14:12:52 2025 +0100
+++ b/plugins/mod_c2s.lua	Thu Feb 06 12:40:11 2025 +0000
@@ -273,6 +273,7 @@
 		if not (hosts[host] and hosts[host].type == "local") then
 			return -- not a local VirtualHost so no sessions
 		end
+		module:log("debug", "Disconnecting %s sessions of %s@%s (%s)", not leave_resource and "all" or "other", username, host, reason.text);
 		local user = hosts[host].sessions[username];
 		if user and user.sessions then
 			for r, session in pairs(user.sessions) do