From 2ef771fff8ff2a2f764c3d0ea8397902f187d72e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 17 Feb 2024 19:07:57 +0100 Subject: mod_c2s: Fix error on role change on Components (thanks Menel) --- plugins/mod_c2s.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 4dabf34b..1a24c27c 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -252,6 +252,9 @@ end 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 -- cgit v1.2.3