--- a/plugins/mod_c2s.lua Fri Feb 16 00:15:36 2024 +0100
+++ b/plugins/mod_c2s.lua Sat Feb 17 19:07:57 2024 +0100
@@ -252,6 +252,9 @@
local function disconnect_user_sessions(reason, leave_resource)
return function (event)
local username, host, resource = event.username, event.host, event.resource;
+ if not (hosts[host] and hosts[host].type == "local") then
+ return -- not a local VirtualHost so no sessions
+ end
local user = hosts[host].sessions[username];
if user and user.sessions then
for r, session in pairs(user.sessions) do